2 ms·
NVIDIA put out a book with Bezier rendering algorithms in it: https://developer.nvidia.com/gpugems/gpugems3/part-iv-image-effects/chapter-25-rendering-vector-ar
by kmeisthax 5y ago
NVIDIA put out a book with Bezier rendering algorithms in it: https://developer.nvidia.com/gpugems/gpugems3/part-iv-image-effects/chapter-25-rendering-vector-art-gpu https://developer.nvidia.com/gpugems/gpugems3/part-iv-image-... which is itself derived from a paper whose name I don't remember.
Basically, all quadratic Bezier curves are just linear transformations[0] of the curve u^2 - v. The fragment shader just evaluates that one equation to draw the curve, and texture mapping does all the rest. As long as you're careful to ensure that your fill surface polygon actually makes sense, you get back out perfectly-rendered Beziers at any zoom factor or angle.
[0] Scale/shear/rotate - all the things you can do by matrix multiplication against a vector. Notably, not including translations; though GPUs just so happen to use a coordinate system that allows linear translations if you follow some conventions.
- delhanty 5y agoThank you - I appreciate the link. > from a paper whose name I don't remember. I guess it's the Loop-Blinn paper from my reply to the other reply. Resolution Independent Curve Rendering using Programmable Graphics Hardware https://www.microsoft.com/en-us/research/wp-content/uploads/2005/01/p1000-loop.pdf https://www.microsoft.com/en-us/research/wp-content/uploads/...