Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


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: 363

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: 363

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: 8001

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