Standard Shader - Transparent/Fade Issue

Hello,

I have a model of a car that is currently using the Standard-Opaque shader, with a metallic look applied to it.

At some point in my game, I wish for this car to Fade out, by turning Transparent. However, when I change the material to Standard-Transparent, the mesh z-depth appears very incorrect.

As you can see, mesh from a non-visible angle are appearing. In fact using the Transparent / Fade shader on any complex mesh always gives incorrect results.

Am I missing something here?

For those still struggling with this like me, Unity has a say in it:

Look under “Transparent shader with depth writes”.

Like the people above said, the transparent Shaders ignore Z-Order. Just write a new Shader, using the code provided on the link. It will enable Z-Order and call the standard transparent Shader. Worked like a charm here.

Have you tried changing the render queue? This happens when you have clashing materials with the same queue priority.

this is a classic computer rendering problem. transparent polygons are not sorted, they are rendered in arbitrary order. your model has a lot of internal geometry. When rendering solid… z-buffer sorting solves your issue. But not when transparent, as sorting is off…
several options… none too simple.

  1. Get a car model without so much internal geometry… it will still have the render problem, but not look as bad
  2. Get a 2 pass shader… with Z-write enabled, that renders z-depth only first… then renders again the transparent polygons, will solve your issue as it will only render the closest geom, not internal geometry, but hard to find that shader perhaps. Try the unity shader wiki (I’d go with this option)

Maybe, just I guess, you should try to render the transparent part first.
Open a new standard .shader, and then type

	SubShader{
		Tags {
			"Queue" = "Geometry+1001"
		}
                Pass{...

The rendering procedural will be “Cutout → Skybox → Transparent → Geometry” instead of “Geometry → Cutout → Skybox → Transparent”.
Just my guess, I don’t have material displayed like that for testing.

SubShader{
Pass
{
ZWrite On
ColorMask 0
}

it work for me

ZWrite On