summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2019-03-12 12:41:17 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2019-03-13 12:41:30 +0000
commit243fabc5db3f6a78dc8a979d33d043c011f8be7c (patch)
treeefecd791f9cd366c742c6bd35e7d2191ae49d811
parent9e497c6c136925d3235cfacd61f3d8a2ad7defa5 (diff)
Text: Draw shadow in text color
To match the editor, the drop shadow should be in the text color and not gray. Task-number: QT3DS-3140 Change-Id: I5147da5274603ff5161f437a3b233f084b525164 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r--src/runtime/shaders/distancefieldtext_dropshadow.frag2
-rw-r--r--src/runtime/shaders/distancefieldtext_dropshadow_core.frag2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/shaders/distancefieldtext_dropshadow.frag b/src/runtime/shaders/distancefieldtext_dropshadow.frag
index da51c5c..94b277c 100644
--- a/src/runtime/shaders/distancefieldtext_dropshadow.frag
+++ b/src/runtime/shaders/distancefieldtext_dropshadow.frag
@@ -15,7 +15,7 @@ void main()
clamp(shadowSampleCoord,
normalizedTextureBounds.xy,
normalizedTextureBounds.zw)).a);
- highp vec4 shadowPixel = shadowColor * shadowAlpha;
+ highp vec4 shadowPixel = color * shadowColor * shadowAlpha;
highp float textAlpha = smoothstep(alphas.x,
alphas.y,
diff --git a/src/runtime/shaders/distancefieldtext_dropshadow_core.frag b/src/runtime/shaders/distancefieldtext_dropshadow_core.frag
index 46a1194..8daa915 100644
--- a/src/runtime/shaders/distancefieldtext_dropshadow_core.frag
+++ b/src/runtime/shaders/distancefieldtext_dropshadow_core.frag
@@ -20,7 +20,7 @@ void main()
clamp(shadowSampleCoord,
normalizedTextureBounds.xy,
normalizedTextureBounds.zw)).r);
- vec4 shadowPixel = shadowColor * shadowAlpha;
+ vec4 shadowPixel = color * shadowColor * shadowAlpha;
float textAlpha = smoothstep(alphas.x,
alphas.y,