PDA

View Full Version : Polygon antialiasing.



9ine
08-14-2004, 08:14 PM
I do some antialiasing for poligons with GL_POLYGON_SMOOTH the code:
glEnable (GL_BLEND);
glEnable (GL_POLYGON_SMOOTH);
glBlendFunc (GL_SRC_ALPHA,GL_ONE)
glBegin(GL_QUADS)
....
glEnd()
With this params for BlendFunc qudas is properly antialiased but when I change GL_ONE to GL_ONE_MINUS_SRC_ALPHA the black diagonal line appears across them why? like this:
|\ |
| \

dorbie
08-15-2004, 03:37 PM
Because the incomming fragment contribution is reduced by the destination edge fragment's alpha. The totals should be one but in doing the modulation of destination by 1-source the total or the contribution from both polygons on the edge is no longer 1.0 where they share a pixel.