From 67d0d060ac8c66c6dbb0b84c69b9e49faa87c7bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Thu, 25 Apr 2019 11:30:07 +0300 Subject: Fix distance field shaders for ES3.2 Task-number: QT3DS-3352 Change-Id: Ic0d2e7910079a6c263f6e59b81ef0588a6455654 Reviewed-by: Jere Tuliniemi Reviewed-by: Janne Koskinen --- src/Runtime/res/effectlib/distancefieldtext_core.vert | 2 +- src/Runtime/res/effectlib/distancefieldtext_dropshadow_core.vert | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Runtime/res') diff --git a/src/Runtime/res/effectlib/distancefieldtext_core.vert b/src/Runtime/res/effectlib/distancefieldtext_core.vert index 074a73ac..1ced295c 100644 --- a/src/Runtime/res/effectlib/distancefieldtext_core.vert +++ b/src/Runtime/res/effectlib/distancefieldtext_core.vert @@ -39,6 +39,6 @@ void main() { float scale = fontScale * sqrt(abs(determinant(modelView))); alphas = alphaRange(scale); - sampleCoord = tCoord * vec2(1.0 / textureWidth, 1.0 / textureHeight); + sampleCoord = tCoord * vec2(1.0 / float(textureWidth), 1.0 / float(textureHeight)); gl_Position = mvp * vec4(vCoord, 1.0); } diff --git a/src/Runtime/res/effectlib/distancefieldtext_dropshadow_core.vert b/src/Runtime/res/effectlib/distancefieldtext_dropshadow_core.vert index 51190577..3b1ba712 100644 --- a/src/Runtime/res/effectlib/distancefieldtext_dropshadow_core.vert +++ b/src/Runtime/res/effectlib/distancefieldtext_dropshadow_core.vert @@ -44,7 +44,7 @@ void main() float scale = fontScale * sqrt(abs(determinant(modelView))); alphas = alphaRange(scale); - vec2 textureSizeMultiplier = vec2(1.0 / textureWidth, 1.0 / textureHeight); + vec2 textureSizeMultiplier = vec2(1.0 / float(textureWidth), 1.0 / float(textureHeight)); sampleCoord = tCoord * textureSizeMultiplier; shadowSampleCoord = (tCoord - shadowOffset) * textureSizeMultiplier; -- cgit v1.2.3