• Advertisement
Sign in to follow this  

how to control the deph stencil in the pixel shader

This topic is 2037 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
I just discovered
[source lang="java"]http://msdn.microsoft.com/en-us/library/windows/desktop/bb509647[/source]


there is the answer Edited by lomateron

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement