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):

[15341-screen+shot+2013-09-11+at+10.20.31.png|15341]

And this is the one using the transparent material:

[15342-screen+shot+2013-09-11+at+10.20.15.png|15342]

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.

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.