Sign in to follow this  

how to control the deph stencil in the pixel shader

Recommended Posts

[quote name='lomateron' timestamp='1348631781' post='4983869']
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this