Today I found that the color dodge algorithm in Photoshop can be simplified:

//let b = base color, c = mix color, then
b + (b * c) / (1 - c) = b / (1 - c);

This clearly tells us how the final color variation trend is: The weaker the mixed color c is, the closer the result color is to the base color; The stronger the mixed color c is, the brighter the result color is to the white color. That is, to achieve the effect of color reduction. Using this feature, The alpha channel of base texture used in our project stores the mask of flow light texture, which can be viewed as a gray texture rearranged the mesh order to indicate the order in which flow light appears on these mesh when flowing along the U / V direction. The mixture of base color and flow light color uses the color dodge algorithm, which needs to be normalized:

finalColor.xyz = normalize(finalColor.xyz / (1.0 - flowColor));
2017-05-10 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *