Frictional Games Forum (read-only)
Z-fighting issues - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-57.html)
+--- Forum: Technical Support - Penumbra Series (https://www.frictionalgames.com/forum/forum-22.html)
+--- Thread: Z-fighting issues (/thread-956.html)



Z-fighting issues - MHaggag - 04-26-2007

Vista Ultimate 32-bit, Radeon X300 SE, Catalyst 7.4 (and 7.3, and 7.2).

At shader details < high, lighting suffers from a lot of z-fighting. The lit walls continuously flicker between the lit/unlit state (projected lightmap?), and the issue is apparent with the flashlight model itself as well since it's close to the near-clipping plane--a triangle in the corner of the flashlight keeps flickering (appearing and disappearing).

The same z-fighting occurs in the ship at the beginning of the game, even at high shader quality--the map on the table, the jacket on the wall, and the wall with windows flicker depending on the viewer angle relative to them.

Are you using depth bias/polygon-offset for multipass effects?


RE: Z-fighting issues - Thomas - 04-26-2007

I am using EQUAL depth test mode when rendering and this might casue soem problems allthough no other ATI card has had problem.

I think this is becuase of ATI Vista drivers I am afraid ....


RE: Z-fighting issues - MHaggag - 04-26-2007

Thomas Wrote:I am using EQUAL depth test mode when rendering and this might casue soem problems allthough no other ATI card has had problem.

I think this is becuase of ATI Vista drivers I am afraid ....

Would a depth func of GL_LEQUAL together with polygon offset work? That's what I use in my code to work on this card/driver combo, since GL_EQUAL causes z-fighting. Out of one of my apps:

Code:
glEnable(GL_POLYGON_OFFSET_FACTOR);
glPolygonOffset(1, 1);
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
glDepthFunc(GL_LEQUAL);



RE: Z-fighting issues - Thomas - 04-26-2007

No it is not possible and is a must for the rendering to work.