Add additive color before applying object colors

Based on what I saw in this video (https://youtu.be/Yx1tflavea8), the 
additive colors are applied before the object colors
This commit is contained in:
Kevin Caccamo 2018-12-21 02:11:57 -05:00 committed by Christoph Oelckers
parent 0773e6a98e
commit 9622ca7517

View file

@ -111,11 +111,12 @@ vec4 getTexel(vec2 st)
return texel;
}
if (uObjectColor2.a == 0.0) texel *= uObjectColor;
else texel *= mix(uObjectColor, uObjectColor2, gradientdist.z);
texel.rgb += uAddColor.rgb;
if (uObjectColor2.a == 0.0) texel *= uObjectColor;
else texel *= mix(uObjectColor, uObjectColor2, gradientdist.z);
return desaturate(texel);
}