- Home /
Transparent shaders NOT working right, is there a work-around?
I'm trying to get a basketball hoop into my scene. The net uses the Transparent/Diffuse shader and transparent texture, but it won't display correctly. Here's a screenshot of what happens:
Unity can't seem to figure out which part is in front of which, and messes the final image. Any way to fix this? Or am I doing it entirely wrong? Tnx in advance.
Answer by Kith · Jul 19, 2011 at 04:48 PM
Have you tried using a Cutout shader?
You're my new favorite person. :D
Could you explain the difference between transparent and cutout a bit, just for clarity's sake?
Transparent/Diffuse allows partial transparency for models (for translucence and what not). Although this is sometimes useful, Unity sometimes has some problems deciding in what order to render things. Using a cutout shader solves that problem, because you're saying that something is either fully visible or fully transparent. That's kind of like a quick overview of it, but there is a lot of information regarding cutout shaders online.
http://unity3d.com/support/documentation/Components/shader-TransCutSpecular.html