From 8fb70142e41ab09cd3c6fc3b4545a3be66276be8 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 2 Jan 2016 15:57:19 -0300 Subject: [PATCH] Ability to use opacity on distance field textures, fixes #2148 --- drivers/gles2/shaders/canvas.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl index 259e82d704f..285abd30ff5 100644 --- a/drivers/gles2/shaders/canvas.glsl +++ b/drivers/gles2/shaders/canvas.glsl @@ -196,7 +196,7 @@ void main() { #ifdef USE_DISTANCE_FIELD const float smoothing = 1.0/32.0; float distance = texture2D(texture, uv_interp).a; - color.a = smoothstep(0.5 - smoothing, 0.5 + smoothing, distance); + color.a = smoothstep(0.5 - smoothing, 0.5 + smoothing, distance) * color.a; #else color *= texture2D( texture, uv_interp );