summaryrefslogtreecommitdiffstats
path: root/src/extras/shaders/gl3/distancefieldtext.frag
diff options
context:
space:
mode:
Diffstat (limited to 'src/extras/shaders/gl3/distancefieldtext.frag')
-rw-r--r--src/extras/shaders/gl3/distancefieldtext.frag4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/extras/shaders/gl3/distancefieldtext.frag b/src/extras/shaders/gl3/distancefieldtext.frag
index 23dff8e0f..998fa6e79 100644
--- a/src/extras/shaders/gl3/distancefieldtext.frag
+++ b/src/extras/shaders/gl3/distancefieldtext.frag
@@ -34,6 +34,6 @@ void main()
float maxAlpha = threshold + range;
float distVal = texture(distanceFieldTexture, texCoord).r;
- fragColor = color * smoothstep(minAlpha, maxAlpha, distVal);
- gl_FragDepth = gl_FragCoord.z - zValue * 0.00001;
+ fragColor = vec4(color.rgb, color.a * smoothstep(minAlpha, maxAlpha, distVal));
+ gl_FragDepth = gl_FragCoord.z - zValue * 0.000001;
}