- Home /
How to control the alpha output of vertex lit shaders?
I'm in the situation that I need to render some things into a RenderTexture including a valid alpha value.
I would assume that a shader that produces a fully opaque result would also write a 1 (full white) into the alpha channel of the RenderTexture, but some actually write the alpha value of the material's color (even though it has no effect on the RGB output itself) and some simply don't write into the alpha channel at all.
Feel free to test it and compare "Mobile/VertexLit" versus "Mobile/VertexLit (Only Directional Lights)" on 4.6.x
Looking at the source I see that those two are completely different under the hood, but I still don't know what causes the behaviour or how I could resolve it.
Any clever hints?
P.S.: I asked this question in the forums before, realizing shortly after that Answers would've been a better place to go. please forgive me :) http://forum.unity3d.com/threads/inconsistent-alpha-output-of-opaque-built-in-shaders.292457
Your answer
Follow this Question
Related Questions
Shader problem with 2D fake lighting 1 Answer
Transparent shader: final alpha value wrong 2 Answers
Shader to render RenderTexture plus alpha? 1 Answer
Alpha values not blending in RenderTexture 2 Answers
Add vertex transparency to shader 0 Answers