Answer the question
In order to leave comments, you need to log in
How to write a shader for a transparent object in Unity3d so that objects behind it also become invisible in the camera?
Can you please tell me how to write a shader for a transparent object in Unity3d, so that objects behind it also become invisible in the camera?
Answer the question
In order to leave comments, you need to log in
you need to specify the following in the pass:
ZWrite On
ColorMask 0
and in the tags of the pass:
"Queue" = "Geometry-1"
This will disable writing to the color buffer (the object will become invisible), but will fill the depth buffer to clip the geometry.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question