From 9b59dd942c24b03d29a2031e708141f1db35ee7f Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Sun, 23 Jan 2022 20:56:27 +0100 Subject: [PATCH] :wrench: Tweak alpha blending --- src/BrokenGlass.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/BrokenGlass.js b/src/BrokenGlass.js index aa77df0..63fc480 100644 --- a/src/BrokenGlass.js +++ b/src/BrokenGlass.js @@ -201,7 +201,9 @@ if (utils.isInShellProcess()) { // Dissolve the shard by using distance information from the red channel. float dissolve = (shardMap.x - pow(uProgress+0.1, 2)) > 0 ? 1: 0; - cogl_color_out = mix(cogl_color_out, windowColor, dissolve); + windowColor *= dissolve; + + cogl_color_out = mix(cogl_color_out, windowColor, windowColor.a); } } }