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.frag3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag b/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag
index 945ef56fee..b1551d8ef4 100644
--- a/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag
+++ b/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag
@@ -21,5 +21,6 @@ void main()
{
float d = texture(_qt_texture, sampleCoord).r;
float a = smoothstep(ubuf.alphaMin, ubuf.alphaMax, d);
- fragColor = (1.0 - a) * ubuf.styleColor * smoothstep(ubuf.outlineAlphaMax0, ubuf.outlineAlphaMax1, d);
+ fragColor = step(1.0 - a, 1.0) * mix(ubuf.styleColor, ubuf.color, a)
+ * smoothstep(ubuf.outlineAlphaMax0, ubuf.outlineAlphaMax1, d);
}