diff --git a/data/shaders/drawimage.frag b/data/shaders/drawimage.frag index 1559de7277..f6f8ed139d 100644 --- a/data/shaders/drawimage.frag +++ b/data/shaders/drawimage.frag @@ -59,11 +59,16 @@ void main() { texel = uPalette[texture(uTexture, vec3(fTexColourCoords, float(fTexColourAtlas))).r]; } - vec4 mask = uPalette[texture(uTexture, vec3(fTexMaskCoords, float(fTexMaskAtlas))).r]; if (fMask != 0) { - oColour = texel * mask; + float mask = texture(uTexture, vec3(fTexMaskCoords, float(fTexMaskAtlas))).r; + if ( mask == 0.0 ) + { + discard; + } + + oColour = texel; } else {