by chrisseaton · 6y ago · 0 comments
You can reduce all these to drawing triangles.
You can, people have tried this, and it sucks. The main problem is that the conversion of Bézier paths to triangles is a hard problem with lots of conditional branching. Even when you do it, there is the other problem of rendering triangles with really good antialiasing, MSAA forces a compromise between performance and quality. By contrast, piet-gpu does an exact-area calculation for antialiasing.
So it's not a question of whether you can do it, but whether it works well, and approaches like piet-gpu absolutely stomp triangles.
Easier than you think. Here's couple lines of pixel shader that does that, with really good antialiasing and without MSAA:
https://github.com/Const-me/Vrmac/blob/master/Vrmac/Draw/Sha...
Raph is describing an architecture where path evaluation happens on the GPU, without being baked to triangles.