Shader Transparency Issues
Hi, i'm making a tower defence game. I've run into a problem with unity's new shaders( I haven't really touched unity since unity 3)
I want to have my towers fade in as they are built, starting at 0 visibility and ending at max visibility. I would usually do this by changing the shaders alpha through code.
However when i use a standard Opaque shader the alpha value changes nothing. Changing the shader to transparent or fade will allow me to fade in and out the alpha but at max visibility its still a little transparent.
Thanks for your time.
Here's the opaque shader Transparent shader at max alpha
Answer by MafiaMoe · Nov 30, 2016 at 11:40 AM
Should be able to change the material on-the-fly from a transparent to opaque material when the object completes fading in ( https://docs.unity3d.com/ScriptReference/Renderer-material.html ). It is not a perfect solution as the object will suddenly 'pop' from transparent to opaque, but make a light show of it and players might think that was the intention all along (eg. run some 'cool' graphical/lighting effect to hide it).