From 343137587bdcf52d02f2716dbe8db71c74d86214 Mon Sep 17 00:00:00 2001 From: Janne Koskinen Date: Tue, 2 Apr 2019 12:35:57 +0300 Subject: Fix distancefield shaders to compile on OpenGL ES MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove invalid highp qualifiers from the shaders Fixes: QT3DS-3262 Change-Id: I3c42b08aded38f42ab3814a0d76d02da5f63c318 Reviewed-by: Antti Määttä Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/runtime/shaders/distancefieldtext.vert | 4 ++-- src/runtime/shaders/distancefieldtext_dropshadow.vert | 4 ++-- 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; -- cgit v1.2.3