Answer the question
In order to leave comments, you need to log in
Shader in Unity3D, what is the point of multiplying rgb by alpha?
I'm looking at an article on shaders (I myself am a complete novice in this matter), there the following line is given as an example:
half3 starAlbedo = smallStars.rgb * smallStars.a
+ mediumStars.rgb * mediumStars.a
+ bigStars.rgb * bigStars.a;
Answer the question
In order to leave comments, you need to log in
Alpha itself has no meaning, it's just another channel for transmitting information. As the author of the shader wanted, such a meaning will be. In general, multiplying an rgb channel by a number affects the intensity of the color. White color multiplied by 0.5 will turn into gray, by zero - into black. Judging by the name of the variable, the formula considers the brightness of the starry sky, and alpha stores the weights of stars of different types, that is, the degree of their influence on the overall brightness.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question