- Home /
Question by
Lior · Feb 29, 2012 at 04:31 PM ·
shaderbeginnersurfacesurface shader
Z value shader
I want to create a surface shader that outputs a grayscale value based on the pixel's z value. How can I do that?
Comment
Answer by Berenger · Feb 29, 2012 at 04:59 PM
To more experiences guys : is it possible to retrieve some depth information in vertex shader with position.w * frustrumLength ?
Your answer
![](https://koobas.hobune.stream/wayback/20220613064618im_/https://answers.unity.com/themes/thub/images/avi.jpg)