Jump to content

  • Log In with Google      Sign In   
  • Create Account


how to control the deph stencil in the pixel shader


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 lomateron   Members   -  Reputation: 340

Like
0Likes
Like

Posted 25 September 2012 - 09:56 PM

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

Edited by lomateron, 25 September 2012 - 11:04 PM.


Sponsor:

#2 lomateron   Members   -  Reputation: 340

Like
0Likes
Like

Posted 25 September 2012 - 11:07 PM

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


there is the answer

Edited by lomateron, 25 September 2012 - 11:24 PM.


#3 Ashaman73   Crossbones+   -  Reputation: 7266

Like
0Likes
Like

Posted 25 September 2012 - 11:39 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS