PDA

View Full Version : Anti-aliasing for polygons and quads



Javac
11-09-2003, 12:26 AM
I'm using glFrustum(..) to draw the 3d city
scene.
Anti-aliasing is working 100% only for lines.
It looks that drawing polygons and quads
I get still some aliasing( depending on perspective projection parameters).
How to fix it completely?

yaro_dup1
11-09-2003, 02:57 AM
glEnable( GL_POLYGON_SMOOTH );

Javac
11-09-2003, 03:54 AM
Does it works,when blending is disabled?
It seems to me that antialiasing is connected to blending somehow?

yaro_dup1
11-09-2003, 08:13 AM
Yes. Blending function should be glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );

Tzupy
11-10-2003, 03:59 AM
Hi,
If you use (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) as blending parameter, you get cracks between the triangles that make up the polygon. To antialias polygons you should use (GL_SRC_ALPHA_SATURATE, GL_ONE) that works only on black transparent background. You should draw your geometry from front to back and then replace the black background with one last quad of the desired color.
You should keep in mind that polygon antialiasing doesn't work on any card / driver, even if you do it the right way.

Javac
11-10-2003, 09:43 PM
Yes,(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) works perfectly only for lines.

So there is nothing to do with polygons?

Tzupy
11-11-2003, 02:56 AM
Hi,
If you have a Quadro or FireGL, then the polygon antialiasing works very well. On a GeForce4Ti (rev. A3) it also works well, but it's not that accurate (I don't know why). It doesn't seem to work on Radeon 9700.
If someone knows for sure if it works on GeForce FX5900, please let us know.