Hi,
i have a problem with artefacts/flickering in a multipass rendering setup. It’s a open-top cube textured with transparent panorama textures in the 1st pass and cloud textures (also RGBA) in the 2nd one. It works fine on my gf4ti, on gf2mx and on ati7500 but on the TNT2 i get flickering/heavy artefacts. The cloud texture is projected into the cube for the 2nd pass.
i get this: http://www.eisscholle.de/zbuffer.jpg
and with clipping of the uncovered part of the box: http://www.eisscholle.de/zbuffer_clip.jpg
and it shoud look like: http://www.eisscholle.de/z_ok.jpg
glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);glEnable(GL_BLEND);
glDepthFunc( GL_LEQUAL );
CreateSkyBox(0, 0, 0, 200, 200, 200, true, m_uiTextures);
glDepthFunc( GL_EQUAL );
// Projective texturing
m_Proj.Bind( m_uiCloud );
CreateSkyBox(0, 0, 0, 200, 200, 200, false);
m_Proj.Unbind();glDepthFunc( GL_LEQUAL );
glDisable(GL_BLEND);
Since it looks like z-buffer-fighting “at it’s best” i tried the common tricks for 16bit zbuffer hw. glPolygonOffset, disabling depth tests at all, increasing the near plane value and decreasing the far one (1.0 … 300.0 ), rendering first pass with GL_LEQUAL and the 2nd one with GL_EQUAL. Unfortunately, nothing helps.
Do you have any idea if this is a z problem at all, and what i can do about it?
Thank you very much in advance.
regards,
Stephan