multipass vs depth testing....


If i display the same primitive (same geometry) twice (or more) with different (mutli-)textures and/or blend states is there some depth testing optimization i can do since the z-buffer values won’t change for the 2nd (3rd, etc) pass ?

1 _ I know there is glDepthMask(). But is there any other hints/tips for this ?
2 _ Does transparency have some impact on depth testing ?

You could disable it.

You could disable depth write for the extra
passes, which saves at least half of the
depth buffer bandwidth for the success case.
(Could save more, if the bandwidth is
asymmetric weighted for read).

It would be neat if OpenGL would allow N-way
texturing/passes in a single primitive, and
have drivers split into however many physical
passes their hardware needed. Would reduce
geometry traffic, too. Perhaps there’s some
reason why that wouldn’t work, though…

That’s ok for me, i’ll do with that :slight_smile: thanks.

Btw, i’ve noticed on my geforce 2 mx that 24 bits z-buffer was better than 32 bits !
Using 16/32 bits z-buffer my engine shows 53 FPS, with 24 bits z-buffer it shows 58 !
What does that mean ??

You’re probably confused about what you’re actually getting. We don’t support a 32-bit depth buffer, only Z16 and Z24/S8. Maybe you’re getting a 16-bit depth buffer when you ask for 32. Query GL_DEPTH_BITS to find out.

  • Matt