Myth: Vector graphics on GPU is hard because GPUs only know how to draw triangles, not curves. In fact, anyone who has touched a pixel shader in Unity can make a GPU draw a filled circle…
-
-
How to deal with this problem? Some choices are (1) draw paths on CPU and treat as a texture (perhaps SDF); (2) brute force using stencil buffer; (3) brute force in the shader; (4) partition with a CPU prepass (Pathfinder); (5) partition with a compute shader prepass (MPVG).
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
(Signed) distance fields are a different way of approaching this. Fill a pixel where distance is negative, small distances are used for anti aliasing by eg making the edges fade to transparency. They have different problems though, not a panacea :)
-
Yeah, I addressed SDF in the next tweet: drawing the SDF is essentially equivalent to drawing paths on CPU.
- 11 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.