diff --git a/extension.js b/extension.js index 4e4d6c5..da24964 100644 --- a/extension.js +++ b/extension.js @@ -37,7 +37,9 @@ const InvertWindowEffect = new Lang.Class({ uniform sampler2D tex; \ void main() { \ vec4 color = texture2D(tex, cogl_tex_coord_in[0].st); \ - color.rgb /= color.a; \ + if(color.a > 0.0) { \ + color.rgb /= color.a; \ + } \ color.rgb = vec3(1.0, 1.0, 1.0) - color.rgb; \ color.rgb *= color.a; \ cogl_color_out = color * cogl_color_in; \