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 drfrag
parent 6ae47bad88
commit d503d1ce9b

View file

@ -90,11 +90,12 @@ vec4 getTexel(vec2 st)
}
break;
}
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);
}