aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/quick/scenegraph/shaders/distancefieldoutlinetext.frag3
-rw-r--r--src/quick/scenegraph/shaders/distancefieldoutlinetext_core.frag3
-rw-r--r--src/quick/scenegraph/shaders/outlinedtext.frag2
-rw-r--r--src/quick/scenegraph/shaders/outlinedtext_core.frag2
-rw-r--r--src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag3
-rw-r--r--src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag.qsbbin1780 -> 1863 bytes
-rw-r--r--src/quick/scenegraph/shaders_ng/distancefieldoutlinetext_a.frag3
-rw-r--r--src/quick/scenegraph/shaders_ng/distancefieldoutlinetext_a.frag.qsbbin1771 -> 1876 bytes
-rw-r--r--src/quick/scenegraph/shaders_ng/outlinedtext.frag2
-rw-r--r--src/quick/scenegraph/shaders_ng/outlinedtext.frag.qsbbin2067 -> 2174 bytes
-rw-r--r--src/quick/scenegraph/shaders_ng/outlinedtext_a.frag2
-rw-r--r--src/quick/scenegraph/shaders_ng/outlinedtext_a.frag.qsbbin1357 -> 1437 bytes
12 files changed, 12 insertions, 8 deletions
diff --git a/src/quick/scenegraph/shaders/distancefieldoutlinetext.frag b/src/quick/scenegraph/shaders/distancefieldoutlinetext.frag
index f7cdeb9064..7a063e0a9d 100644
--- a/src/quick/scenegraph/shaders/distancefieldoutlinetext.frag
+++ b/src/quick/scenegraph/shaders/distancefieldoutlinetext.frag
@@ -12,5 +12,6 @@ void main()
{
mediump float d = texture2D(_qt_texture, sampleCoord).a;
mediump float a = smoothstep(alphaMin, alphaMax, d);
- gl_FragColor = (1.0 - a) * styleColor * smoothstep(outlineAlphaMax0, outlineAlphaMax1, d);
+ gl_FragColor = step(1.0 - a, 1.0) * mix(styleColor, color, a)
+ * smoothstep(outlineAlphaMax0, outlineAlphaMax1, d);
}
diff --git a/src/quick/scenegraph/shaders/distancefieldoutlinetext_core.frag b/src/quick/scenegraph/shaders/distancefieldoutlinetext_core.frag
index 622e353019..73cf9a1c29 100644
--- a/src/quick/scenegraph/shaders/distancefieldoutlinetext_core.frag
+++ b/src/quick/scenegraph/shaders/distancefieldoutlinetext_core.frag
@@ -16,5 +16,6 @@ void main()
{
float d = texture(_qt_texture, sampleCoord).r;
float a = smoothstep(alphaMin, alphaMax, d);
- fragColor = (1.0 - a) * styleColor * smoothstep(outlineAlphaMax0, outlineAlphaMax1, d);
+ fragColor = step(1.0 - a, 1.0) * mix(styleColor, color, a)
+ * smoothstep(outlineAlphaMax0, outlineAlphaMax1, d);
}
diff --git a/src/quick/scenegraph/shaders/outlinedtext.frag b/src/quick/scenegraph/shaders/outlinedtext.frag
index 5fe2b14e24..1075261d5f 100644
--- a/src/quick/scenegraph/shaders/outlinedtext.frag
+++ b/src/quick/scenegraph/shaders/outlinedtext.frag
@@ -17,5 +17,5 @@ void main()
texture2D(_qt_texture, sCoordRight).a,
0.0, 1.0) - glyph,
0.0, 1.0);
- gl_FragColor = outline * styleColor;
+ gl_FragColor = outline * styleColor + step(1.0 - glyph, 1.0) * glyph * color;
}
diff --git a/src/quick/scenegraph/shaders/outlinedtext_core.frag b/src/quick/scenegraph/shaders/outlinedtext_core.frag
index 4d7c614185..f3273cbdb6 100644
--- a/src/quick/scenegraph/shaders/outlinedtext_core.frag
+++ b/src/quick/scenegraph/shaders/outlinedtext_core.frag
@@ -21,5 +21,5 @@ void main()
texture(_qt_texture, sCoordRight).r,
0.0, 1.0) - glyph,
0.0, 1.0);
- fragColor = outline * styleColor;
+ fragColor = outline * styleColor + step(1.0 - glyph, 1.0) * glyph * color;
}
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);
}
diff --git a/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag.qsb b/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag.qsb
index 942db41a5a..eae467fab0 100644
--- a/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag.qsb
+++ b/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext.frag.qsb
Binary files differ
diff --git a/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext_a.frag b/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext_a.frag
index 7ccd06610a..7c6bd9a493 100644
--- a/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext_a.frag
+++ b/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext_a.frag
@@ -21,5 +21,6 @@ void main()
{
float d = texture(_qt_texture, sampleCoord).a;
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);
}
diff --git a/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext_a.frag.qsb b/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext_a.frag.qsb
index 00e0497248..d02e1d4c7f 100644
--- a/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext_a.frag.qsb
+++ b/src/quick/scenegraph/shaders_ng/distancefieldoutlinetext_a.frag.qsb
Binary files differ
diff --git a/src/quick/scenegraph/shaders_ng/outlinedtext.frag b/src/quick/scenegraph/shaders_ng/outlinedtext.frag
index aac9e4bff8..947d161a50 100644
--- a/src/quick/scenegraph/shaders_ng/outlinedtext.frag
+++ b/src/quick/scenegraph/shaders_ng/outlinedtext.frag
@@ -29,5 +29,5 @@ void main()
texture(_qt_texture, sCoordRight).r,
0.0, 1.0) - glyph,
0.0, 1.0);
- fragColor = outline * ubuf.styleColor;
+ fragColor = outline * ubuf.styleColor + step(1.0 - glyph, 1.0) * glyph * ubuf.color;
}
diff --git a/src/quick/scenegraph/shaders_ng/outlinedtext.frag.qsb b/src/quick/scenegraph/shaders_ng/outlinedtext.frag.qsb
index 95924de0c8..1756ee9d4b 100644
--- a/src/quick/scenegraph/shaders_ng/outlinedtext.frag.qsb
+++ b/src/quick/scenegraph/shaders_ng/outlinedtext.frag.qsb
Binary files differ
diff --git a/src/quick/scenegraph/shaders_ng/outlinedtext_a.frag b/src/quick/scenegraph/shaders_ng/outlinedtext_a.frag
index 481d8c94d0..5b7bd9ca82 100644
--- a/src/quick/scenegraph/shaders_ng/outlinedtext_a.frag
+++ b/src/quick/scenegraph/shaders_ng/outlinedtext_a.frag
@@ -29,5 +29,5 @@ void main()
texture(_qt_texture, sCoordRight).a,
0.0, 1.0) - glyph,
0.0, 1.0);
- fragColor = outline * ubuf.styleColor;
+ fragColor = outline * ubuf.styleColor + step(1.0 - glyph, 1.0) * glyph * ubuf.color;
}
diff --git a/src/quick/scenegraph/shaders_ng/outlinedtext_a.frag.qsb b/src/quick/scenegraph/shaders_ng/outlinedtext_a.frag.qsb
index ddceb17a94..f44b92dc28 100644
--- a/src/quick/scenegraph/shaders_ng/outlinedtext_a.frag.qsb
+++ b/src/quick/scenegraph/shaders_ng/outlinedtext_a.frag.qsb
Binary files differ