how to control the deph stencil in the pixel shader

Started by
1 comment, last by Ashaman73 11 years, 6 months ago
the depth is normally determined in the vertex shader, is there any way to do it on the pixel shader?
Advertisement
I just discovered
[source lang="java"]http://msdn.microsoft.com/en-us/library/windows/desktop/bb509647[/source]


there is the answer

the depth is normally determined in the vertex shader, is there any way to do it on the pixel shader?

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.

Best to tell us what you want to archieve, there are often many other options available.

This topic is closed to new replies.

Advertisement