View Full Version : What's polygon offset?

07-24-2000, 04:41 AM
Quake3 marks on walls are polygons with polygon offset off? What's that?

07-24-2000, 05:57 AM
I think the use of that is so that the Zbuffer doesn't goof up and put the wall infront of the mark.

07-24-2000, 05:58 AM
Hi Kronos, I said with polygon offset ENABLED.
If you want to render two polygons (here, the wall and the mark) on the same position but the one polygon (the mark) should lie in front of the wall, so that no z-buffer artifacts are visible, you can shift the depth position with the OpenGL function
glPolygonOffset(factor, units);
and enable the functionality with glEnable(GL_POLYGON_OFFSET_FILL); for filled primitives or GL_POLYGON_OFFSET_LINE or GL_POLYGON_OFFSET_POINT respectively.

This functionality makes it possible to draw the nice edged-faces mode like in 3DS MAX without the ugly z-bleeding of the edges.