I have a top down view on a house and I want the roof to transition from fully opaque to transparent as an agent enters the house. We thought we would get this working with the standard shader using the Fade rendering mode and the albedo set to some color. The color works fine in Opaque rendering mode but when we switch to Fade rendering mode, the roof goes to black. It does fade beautifully when I change the alpha value of the albedo parameter - exactly what I want EXCEPT that it’s starting out as fully black and not the albedo color we’ve set.
Just a bump to note that I’m experiencing a similar problem: using “fade” or “transparent” with the new Standard shader produces an effect like that of flipped normals. This is happening on an imported (FBX) model. “Opaque” works fine. Curiously, “fade” with Unity primitives works fine, too, so I’m suspecting something in FBX import. (I’m bringing in models from 3ds Max 2014).
I’d say you have a different problem from the OP. Looks to me as though most of your buildings are collapsed into a few single models/meshes instead of being individual. This means when using a transparent shader type you will suffer from draw order problems as real-time 3d engines rarely, if ever, sort per triangle. Instead they sort per model/mesh as sorting per polygon is usually unfeasible in terms of overall performance. In opaque rendering this doesn’t matter as the depth buffer is used to ensure correct draw order at the pixel leve, but this cannot be used with transparent objects.
Split you model into individual buildings and it should work fine with transparent shader.
Well, son-of-a-- that did work!
Many thanks, Noisecrime. I appreciate the explanation of what’s happening in the engine, too. I’m coming to this from a “build whatever and just wait for the render” career (video animation), so it’s good to get some education – even if some of it does come the hard way (about 6 hours of it today)!
I’ve added three images. roof_opaque.png is a Unity 5 standard shader with Opaque rendering mode - this renders with a reddish color as per the albedo setting. roof_fade_black.png is the same shader switched to Fade rendering mode with alpha = 255. It shows as fully black where we were expecting the same color as per roof_opaque. The shader does fade nicely when the alpha is adjusted as per roof_fade_alpha. Do those pictures adequately describe the issue?