summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Koskinen <janne.p.koskinen@qt.io>2019-04-02 12:35:57 +0300
committerJanne Koskinen <janne.p.koskinen@qt.io>2019-04-02 10:37:16 +0000
commit343137587bdcf52d02f2716dbe8db71c74d86214 (patch)
treee8c8dee5fef532c9d1675dc2f8131df7032da8fb
parent9aa02769f69ecf5f1204494efd1686af7160baef (diff)
Fix distancefield shaders to compile on OpenGL ES
Remove invalid highp qualifiers from the shaders Fixes: QT3DS-3262 Change-Id: I3c42b08aded38f42ab3814a0d76d02da5f63c318 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
-rw-r--r--src/runtime/shaders/distancefieldtext.vert4
-rw-r--r--src/runtime/shaders/distancefieldtext_dropshadow.vert4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/shaders/distancefieldtext.vert b/src/runtime/shaders/distancefieldtext.vert
index 879545f..7a111bc 100644
--- a/src/runtime/shaders/distancefieldtext.vert
+++ b/src/runtime/shaders/distancefieldtext.vert
@@ -30,7 +30,7 @@ highp vec2 alphaRange(highp float scale)
highp float range = spreadFunc(scale);
highp float alphaMin = max(0.0, base - range);
highp float alphaMax = min(base + range, 1.0);
- return highp vec2(alphaMin, alphaMax);
+ return vec2(alphaMin, alphaMax);
}
highp float determinantOfSubmatrix(highp mat4 m, int col0, int col1, int row0, int row1)
@@ -59,6 +59,6 @@ void main()
{
highp float scale = fontScale * sqrt(abs(determinant(modelView)));
alphas = alphaRange(scale);
- sampleCoord = tCoord * highp vec2(1.0 / highp float(textureWidth), 1.0 / highp float(textureHeight));
+ sampleCoord = tCoord * vec2(1.0 / float(textureWidth), 1.0 / float(textureHeight));
gl_Position = mvp * vCoord;
}
diff --git a/src/runtime/shaders/distancefieldtext_dropshadow.vert b/src/runtime/shaders/distancefieldtext_dropshadow.vert
index 69fd211..65e8e00 100644
--- a/src/runtime/shaders/distancefieldtext_dropshadow.vert
+++ b/src/runtime/shaders/distancefieldtext_dropshadow.vert
@@ -34,7 +34,7 @@ highp vec2 alphaRange(highp float scale)
highp float range = spreadFunc(scale);
highp float alphaMin = max(0.0, base - range);
highp float alphaMax = min(base + range, 1.0);
- return highp vec2(alphaMin, alphaMax);
+ return vec2(alphaMin, alphaMax);
}
highp float determinantOfSubmatrix(highp mat4 m, int col0, int col1, int row0, int row1)
@@ -64,7 +64,7 @@ void main()
highp float scale = fontScale * sqrt(abs(determinant(modelView)));
alphas = alphaRange(scale);
- highp vec2 textureSizeMultiplier = highp vec2(1.0 / highp float(textureWidth), 1.0 / highp float(textureHeight));
+ highp vec2 textureSizeMultiplier = vec2(1.0 / highp float(textureWidth), 1.0 / float(textureHeight));
sampleCoord = tCoord * textureSizeMultiplier;
shadowSampleCoord = (tCoord - shadowOffset) * textureSizeMultiplier;