PDA

View Full Version : best simple antialiasing of lines -- textures or alpha vertices?



bsabiston
02-04-2013, 08:03 AM
Hello,

I have read that a good way to antialias lines in openGl is to use a texture map of an antialiased circle and map the coordinates of a rectangular set of vertices to it, like this:

http://answers.oreilly.com/topic/1669-how-to-render-anti-aliased-lines-with-textures-in-ios-4/

However, I've also read about adding a layer of polygons around the outside of a rectangle, with the outer vertex alpha equal to 0. That is what I do now, and it looks fine.

http://stackoverflow.com/questions/3512456/how-to-draw-smooth-line-with-antialias
http://stackoverflow.com/questions/1813035/opengl-es-iphone-drawing-anti-aliased-lines

But I am wondering if the other way is faster, maybe? Which technique is better?

Thanks
Bob

tonyo_au
02-04-2013, 11:21 PM
Given that the same number of pixels are rendered the few the number of triangles is better.