From c9000fcad7a133143fbc451113aa1982e9f7bcd8 Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Thu, 27 Jan 2022 21:33:33 +0100 Subject: [PATCH] :beetle: Fix blending of fire shader --- src/Fire.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fire.js b/src/Fire.js index e7640e0..eecbeb0 100644 --- a/src/Fire.js +++ b/src/Fire.js @@ -334,7 +334,7 @@ if (utils.isInShellProcess()) { cogl_color_out = texture2D(uTexture, cogl_tex_coord_in[0].st) * effectMask.x; // Add the fire to the window. - cogl_color_out = mix(cogl_color_out, fire, fire.a); + cogl_color_out = cogl_color_out * (1.0 - fire.a) + fire; // These are pretty useful for understanding how this works. // cogl_color_out = vec4(vec3(noise), 1);