Hi everyone,
When draw an object using two passes I have the following problem:
The first pass is a color pass (simple texturing or an opengl shader).
The second pass is a environment-map pass using a cube map with some alpha-blending.
I notice that when I use a shader for the first pass there is z-fighting, but when I use stadard opengl (e.g. just a texture or solid) everything is OK.
Could the problem occur because of the vertex shader not returning the same vertex coordinates as the vertices of the second pass? (precision problem maybe?)
The vertex program is:
varying vec3 Normal;
void main(void)
{
Normal = normalize(gl_NormalMatrix * gl_Normal);
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}
Could this be a driver bug? I have a GeForce5600Go with 65.73 drivers