Transparent texture showing through other faces of same object
I have a material with shader unlit/transparent and a texture with transparency.
If I apply it to two distinct objects, everything works as expected. Here is an example with two cubes, with a solid material first, and then with the transparent one:
Instead, if I apply the material to a single object, the transparent texture from a face in the background shows through another face of the same object in the foreground, like in this example with a T-shaped object (note that this is even more evident with a completely opaque texture, like the red one in the second row):
Do I need to apply different settings for the material?
You need to write and test depth. It's a shader property.
http://docs.unity3d.com/$$anonymous$$anual/SL-CullAndDepth.html
Thanks for the link, I copied the shader in the example and it seems to work! I'll try to understand a bit better what's going on now :)
Your answer
Follow this Question
Related Questions
Change surface type with LWRP 4 Answers
How to apply a fade in transparency to objects that have materials that reference images 0 Answers
Imported material with texture transparency 0 Answers
Lerp frm opacity does't reveal material 0 Answers
Fragment shader shows alpha, surface shader doesn't 0 Answers