From 9622ca7517ba57935da263b73c648289c6789d9b Mon Sep 17 00:00:00 2001 From: Kevin Caccamo Date: Fri, 21 Dec 2018 02:11:57 -0500 Subject: [PATCH] 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 --- wadsrc/static/shaders/glsl/main.fp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wadsrc/static/shaders/glsl/main.fp b/wadsrc/static/shaders/glsl/main.fp index 1ea88cd8b..ab4d16e91 100644 --- a/wadsrc/static/shaders/glsl/main.fp +++ b/wadsrc/static/shaders/glsl/main.fp @@ -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); }