- Home /
How to make a quad of pixels in screen space?
What code can I use that will let me define a quad by providing three vector 2s, so for example I can give the coordinates "0,0" "3,-1" "," "1,1" "0,4", and a quadrilateral area of pixels with these dimensions will be drawn on the screen. I have attempted everything I know how to do, but I'm not super experienced in C#. Also, the implementation doesn't have to account for concave quadrilaterals, but cannot use triangles.
The easiest way would pworbably be to create a mesh from the four vertices given. using Camera.ViewportToWorldPoint. The Scripting AI for the $$anonymous$$esh class should have an example of creating a mesh during runtime.
Otherwise, you'd have to use a shader to draw each pixel but then you'd have to work out the $$anonymous$$ath yourself.
Your answer
Follow this Question
Related Questions
How to automate unity editor screen grabs 0 Answers
Create more text in unity GUI? (C#) 2 Answers
Distribute terrain in zones 3 Answers
How do i change the GUI.Box font size and box size ? 0 Answers