소스 검색

Ability to use opacity on distance field textures, fixes #2148

Juan Linietsky 9 년 전
부모
커밋
8fb70142e4
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/gles2/shaders/canvas.glsl

+ 1 - 1
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 );