- Home /
Shaderlab texture blender
How does Unity built-in texture blender work? There are very little to no information available online. I understand that there are various operations, such as addition, multiplication etc., but how do they exactly work? I always thought that the standard formula was:
Orgb = srgb*Srgb + drgb * Drgb
but how does it work in Unity's Shaderlab?
let's say 2 textures are solid colored with (1.0, 0.7, 1.0) and (0.0, 0.4, 0.1)
when I use this built-in command:
Blend One One
What is the result? Is it (1, 1.1, 1.1)? Or is it clamped to (1,1,1)? or is it added and divided by 2? What about blending using other operators such as SrcAlpha? Is it like (r1,g1,b1)*a2?
Please help a Unity novice out and point me to the right source or simply explain, I would appreciate it greatly.
Long live Unity!