From f189df91e101135fc9eaf8a58e02a3d77adb1339 Mon Sep 17 00:00:00 2001 From: Thomas Wilshaw Date: Mon, 24 Oct 2022 18:29:42 +0100 Subject: [PATCH] diptoblack: Stop the second half of the transition effecting the first --- app/shaders/diptoblack.frag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/shaders/diptoblack.frag b/app/shaders/diptoblack.frag index 44d2bb6e4..a5c00a16f 100644 --- a/app/shaders/diptoblack.frag +++ b/app/shaders/diptoblack.frag @@ -29,8 +29,8 @@ float TransformCurve(float linear) { void main(void) { if (out_block_in_enabled && in_block_in_enabled) { // mix(x, y , a): a(1-x) + b(x) - vec4 out_block_col = ove_tprog_out==0.0? vec4(0.0) : mix(color_in, texture(out_block_in, ove_texcoord),TransformCurve(ove_tprog_out)); - vec4 in_block_col = mix(color_in, texture(in_block_in, ove_texcoord), TransformCurve(ove_tprog_in)); + vec4 out_block_col = ove_tprog_out == 0.0 ? vec4(0.0) : mix(color_in, texture(out_block_in, ove_texcoord),TransformCurve(ove_tprog_out)); + vec4 in_block_col = ove_tprog_out != 0.0 ? vec4(0.0) : mix(color_in, texture(in_block_in, ove_texcoord), TransformCurve(ove_tprog_in)); frag_color = out_block_col + in_block_col; } else if (out_block_in_enabled) {