View Full Version : Stencil and Depth Test

07-17-2002, 08:54 AM

I'm trying to make a 3D selection using the z-buffer, but for that I need to use the stencil buffer so the scene doesn' t change.

The problem is that when stencil test fails the depth test it's not even done.
There is any way to make the depht test even when the stencil test fails?


Daniel Tost

07-18-2002, 01:26 AM
If you want to use the stencil buffer to prevent pixel from being drawn on the screen (as in, the user won't see what's going on), then just use double buffering and render to the back buffer instead. The back buffer is not visible until you swap the front an back buffers.