summaryrefslogtreecommitdiffstats
path: root/src/Runtime/res/effectlib/distancefieldtext_dropshadow.frag
diff options
context:
space:
mode:
authorPasi Keränen <pasi.keranen@qt.io>2019-05-29 17:00:46 +0300
committerPasi Keränen <pasi.keranen@qt.io>2019-05-31 16:39:22 +0300
commitff1687d03374de568199dc9aced1794cd6947e3e (patch)
treed052c83400e26e52f4e5bdd02c10f8bd1a18c783 /src/Runtime/res/effectlib/distancefieldtext_dropshadow.frag
parent3f85997352569286e2e26c43406ea6697d352dad (diff)
Move files required by OpenGL runtime within ogl-runtime directory
First step towards ejecting ogl-runtime in to its own repository. Task-number: QT3DS-3596 Change-Id: I8c551aef5f680d89221a8075bbeff8857ad2a318 Reviewed-by: Jari Karppinen <jari.karppinen@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Runtime/res/effectlib/distancefieldtext_dropshadow.frag')
-rw-r--r--src/Runtime/res/effectlib/distancefieldtext_dropshadow.frag47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/Runtime/res/effectlib/distancefieldtext_dropshadow.frag b/src/Runtime/res/effectlib/distancefieldtext_dropshadow.frag
deleted file mode 100644
index fdb68bac..00000000
--- a/src/Runtime/res/effectlib/distancefieldtext_dropshadow.frag
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifdef GL_OES_standard_derivatives
-# extension GL_OES_standard_derivatives : enable
-#else
-# define use_fallback
-#endif
-
-varying highp vec2 sampleCoord;
-varying highp vec2 shadowSampleCoord;
-varying highp vec4 normalizedTextureBounds;
-
-#ifdef use_fallback
-varying highp vec2 alphas;
-#endif
-
-uniform sampler2D _qt_texture;
-uniform highp vec4 color;
-uniform highp vec4 shadowColor;
-
-void main()
-{
- highp float shadowDistance = texture2D(_qt_texture,
- clamp(shadowSampleCoord,
- normalizedTextureBounds.xy,
- normalizedTextureBounds.zw)).a;
-#ifdef use_fallback
- highp float shadowAlpha = smoothstep(alphas.x, alphas.y, shadowDistance);
-#else
- highp float shadowDistanceD = fwidth(shadowDistance);
- highp float shadowAlpha = smoothstep(0.5 - shadowDistanceD, 0.5, shadowDistance);
-#endif
-
- highp vec4 shadowPixel = color * shadowColor * shadowAlpha;
-
- highp float textDistance = texture2D(_qt_texture,
- clamp(sampleCoord,
- normalizedTextureBounds.xy,
- normalizedTextureBounds.zw)).a;
-#ifdef use_fallback
- highp float textAlpha = smoothstep(alphas.x, alphas.y, textDistance);
-#else
- highp float textDistanceD = fwidth(textDistance);
- highp float textAlpha = smoothstep(0.5 - textDistanceD, 0.5, textDistance);
-#endif
-
- highp vec4 textPixel = color * textAlpha;
- gl_FragColor = mix(shadowPixel, textPixel, textPixel.a);
-}