Edited by lomateron, 25 September 2012 - 11:04 PM.
how to control the deph stencil in the pixel shader,
Crossbones+ - Reputation: 13470
Posted 25 September 2012 - 11:39 PM
You can change the depth value in the shader, but this is not really recommented due to killing almost any hardware optimization available (early-z-rejection etc.) and the stencil test is already performed before the fragment stage.
the depth is normally determined in the vertex shader, is there any way to do it on the pixel shader?
Best to tell us what you want to archieve, there are often many other options available.