Vector Rendering
February 22nd, 2009
Doing hardware accelerated vector rendering has been something I’ve been interested trying for a long time so I spared a bit of time to get started with it this week. So far I’ve been able to render quadratic bezier curves in closed paths and ellipses which you can see in the screenshot below.

I’m still working on getting cubic beziers and stroked paths working but so far I’m very happy with the results. Because the curve is drawn using a pixel shader I never have to worry about zooming too far or having my polygon approximation of the curve be apparent which is currently the case with my gravity game. Also if you haven’t seen it check out masagin. Here’s a video if you don’t feel like downloading it, but you should because the video doesnt do it justice.
As far as I can tell he just approximates the curves with polygons and doesn’t use a shader to evaluate the actual curve. It still looks excellent but you can see that the curvature isn’t perfect when the camera zooms in really close on some of the elements. I’m working on parsing svg files at the moment so hopefully I’ll have some more examples soon, including the svg tiger.
Also here’s a zip with a few papers I’ve found if anybody else is interested in messing around with this stuff.



