- Home /
What happens when the alpha value is outside the 0..1 range in surface shader lighting models?
If I create a surface shader with a custom lighting model, I need to return a half4 containing RGBA values. I noticed that if I set the alpha of the return value to a value outside the 0..1 range, weird things happen. If the value exceeds 1, the color stays opaque but its intensity increases. If the color is white and the value becomes negative, the image gradually darkens and seems to become less transparent? However, if the color is black, the background starts brightening the lower the alpha value becomes. How does this work?
Your answer
Follow this Question
Related Questions
Depth sorting objects with #pragma alpha in Surface Shader 0 Answers
Cant seem to render alpha surface shader BEHIND geometry 1 Answer
Shader with zwrite, shadows and alpha (special alpha) 2 Answers
How to add Zbuffer to Custom Surface Shader 1 Answer
tangent space viewDir in a SurfaceShader 0 Answers