Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

July 07 2010

16:33

OpenGL Invariance: Texture AA

Using texture mapping for geometry antialiasing is not a new idea. I found descriptions and presentations about it, but no actual code. The basic idea is to replace the original primitive with texture mapped triangles, as illustrated:
The texture applied to the triangles is simply an antialiased circle. Slices of the circle are stretched out for the line and triangle cases. To accommodate fractionally variable primitive sizes, we can generate the circle texture at an arbitrary maximum size and generate mipmaps for smaller sizes. Trilinear mipmapping will then approximate a texture for any desired size.
Tags: opengl