- Home /
alpha value bigger than 1 cause different result compare to webgl,unity shader alpha channel value bigger than one
in a webgl shader if the final alpha value is bigger than 1,it will auto clamp it to 1.0,while in unity when the alpha is bigger than 1 it will accept the value as it is,this will cause difference between unity and html when we apply material blending. for example,the blend mode is Additive,and the final alpha value is 2,in unity the final color can be 2 scrColor + 1 dstColor, while in webgl the result is 1 scrColor + 1 dstColor,so we can't get the same result. ps: i am sorry that my English is not that good ,i hope you can get my point.,in a webgl shader if the final alpha value is bigger than 1,it will auto clamp it to 1.0,while in unity when the alpha is bigger than 1 it will accept the value as it is,this will cause difference between unity and html when we apply material blending. for example,the blend mode is Additive,and the final alpha value is 2,in unity the final color can be 2 scrColor + 1 dstColor, while in webgl the result is 1 scrColor + 1 dstColor,so we can't get the same result. ps: i am sorry that my English is not that good ,i hope you can get my point.
Your answer