I'm trying to write a GLSL shader that is supposed to do what the cycles nodes do with texture color mixing and stuff, but I'm not sure about the math involved behind the MixRGB node. I'm interested in the multiply mode of the MixRGB node. I suspect that the node is simply multiplying the input colors by default.
output = color1.rgba * color2.rgba
But what happens when I'm setting the frac as well? Is it multiplied along with the others as well like:
output = color1.rgba * color2.rgba * frac