aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag')
-rw-r--r--src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag b/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag
index c8c1ac89dc..945ef56fee 100644
--- a/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag
+++ b/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag
@@ -20,6 +20,6 @@ layout(std140, binding = 0) uniform buf {
void main()
{
float d = texture(_qt_texture, sampleCoord).r;
- fragColor = mix(ubuf.styleColor, ubuf.color, smoothstep(ubuf.alphaMin, ubuf.alphaMax, d))
- * smoothstep(ubuf.outlineAlphaMax0, ubuf.outlineAlphaMax1, d);
+ float a = smoothstep(ubuf.alphaMin, ubuf.alphaMax, d);
+ fragColor = (1.0 - a) * ubuf.styleColor * smoothstep(ubuf.outlineAlphaMax0, ubuf.outlineAlphaMax1, d);
}