Transparent shader with occlusion to the invisible parts of the model

Hi there,

I’ve got a 3d object that needs to be half transparent so that the objects behind it are visible; but I would like to get rid of seeing the back surfaces of the 3d object- so that the front surfaces occlude them; as they are all half transparent the back is obv visible atm and one can see the darker areas where the front and the back overlap. Does anyone have a solution?

THanks a million
N

You want a transparent shader with a separate depth pass. Like this:


Transparent shader with depth writes
https://docs.unity3d.com/Manual/SL-CullAndDepth.html

However you don’t want to use that shader, but rather a Surface shader with the separate depth only pass. There are some examples scattered across the forums, like in this thread:

Also this one that is a modified version of the Standard shader with the same added depth only pass.

1 Like