diff --git a/orx-fx/src/main/resources/org/openrndr/extra/fx/gl3/dither/crosshatch.frag b/orx-fx/src/main/resources/org/openrndr/extra/fx/gl3/dither/crosshatch.frag index 8397a225..6b5fc0e5 100644 --- a/orx-fx/src/main/resources/org/openrndr/extra/fx/gl3/dither/crosshatch.frag +++ b/orx-fx/src/main/resources/org/openrndr/extra/fx/gl3/dither/crosshatch.frag @@ -50,6 +50,6 @@ vec3 crosshatch(vec3 texColor, float t1, float t2, float t3, float t4) { void main() { vec4 color = texture(tex0, v_texCoord0); - o_color.rgb = crosshatch(color.rgb, t1, t2, t3, t4); - o_color.a = color.a; + vec3 demultiplied = color.a == 0.0 ? vec3(0.0) : color.rgb/color.a; + o_color = vec4(crosshatch(demultiplied, t1, t2, t3, t4), 1.0) * color.a; } \ No newline at end of file