From 468b1ba2552cf85af955ca654320f532b814a9ac Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 5 Oct 2020 13:43:54 +0100 Subject: [PATCH] Added 2nd conditional back --- src/renderer/webgl/shaders/Multi-frag.js | 5 +++++ src/renderer/webgl/shaders/Single-frag.js | 5 +++++ src/renderer/webgl/shaders/src/Multi.frag | 5 +++++ src/renderer/webgl/shaders/src/Single.frag | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/src/renderer/webgl/shaders/Multi-frag.js b/src/renderer/webgl/shaders/Multi-frag.js index 4c55cad71..4724dc00a 100644 --- a/src/renderer/webgl/shaders/Multi-frag.js +++ b/src/renderer/webgl/shaders/Multi-frag.js @@ -26,6 +26,11 @@ module.exports = [ ' // Solid color + texture alpha', ' color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);', ' }', + ' else if (outTintEffect == 2.0)', + ' {', + ' // Solid color, no texture', + ' color = texel;', + ' }', '', ' gl_FragColor = color;', '}', diff --git a/src/renderer/webgl/shaders/Single-frag.js b/src/renderer/webgl/shaders/Single-frag.js index faa350fa2..f0faf13d1 100644 --- a/src/renderer/webgl/shaders/Single-frag.js +++ b/src/renderer/webgl/shaders/Single-frag.js @@ -22,6 +22,11 @@ module.exports = [ ' // Solid color + texture alpha', ' color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);', ' }', + ' else if (outTintEffect == 2.0)', + ' {', + ' // Solid color, no texture', + ' color = texel;', + ' }', '', ' gl_FragColor = color;', '}', diff --git a/src/renderer/webgl/shaders/src/Multi.frag b/src/renderer/webgl/shaders/src/Multi.frag index 2addcbfea..54ff0a318 100644 --- a/src/renderer/webgl/shaders/src/Multi.frag +++ b/src/renderer/webgl/shaders/src/Multi.frag @@ -25,6 +25,11 @@ void main() // Solid color + texture alpha color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a); } + else if (outTintEffect == 2.0) + { + // Solid color, no texture + color = texel; + } gl_FragColor = color; } diff --git a/src/renderer/webgl/shaders/src/Single.frag b/src/renderer/webgl/shaders/src/Single.frag index 7fb923597..681e70d50 100644 --- a/src/renderer/webgl/shaders/src/Single.frag +++ b/src/renderer/webgl/shaders/src/Single.frag @@ -21,6 +21,11 @@ void main() // Solid color + texture alpha color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a); } + else if (outTintEffect == 2.0) + { + // Solid color, no texture + color = texel; + } gl_FragColor = color; }