- Home /
Shader - Transparent Shows Through
Hello,
I'm getting a really odd behaviour on my transparent shader.
I have a block of cubes, all using the same material (the transparent one). I can see though the cube, to the other cube on the underside (my alpha is at 100%). Here are my screenshots:
This is using the normal diffuse material (so you can compare):
And this is the one using the transparent material:
Any ideas why this is happening? FYI - the reason I want to use the transparent shader is because I'm using iTween to fade them in and out.
Answer by whydoidoit · Sep 11, 2013 at 09:54 AM
Yeah that can be a problem with a transparent shader that isn't writing to Depth - the problem is that the faces of an individual object are not Z sorted prior to rendering, so any old face can be drawn first/last. It's a bit of a challenge sorting out all of the possibilities here, but if these are discrete cubes then writing to depth is probably ok.
Right, so how would I avoid this then? I'm not hugely familiar with shaders
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Multiple transparency shaders yields a massive Unity glitch. 1 Answer
About shader! 0 Answers
[Solved] Shader: cutout shader over a texture 1 Answer
Transparent with Specular Only shader 0 Answers