summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-12-16 15:49:31 +0100
committerGitHub <noreply@github.com>2018-12-16 15:49:31 +0100
commite73afd8dc9c98b98a39a3f1d2329c535ba9c6d22 (patch)
treedf58d5e2423f25e7c311a04e8088eff84fd1cc60 /drivers
parentf00c5c00d7fbd9d5d8c22534cdbbfa3b68dfc54b (diff)
parent205bcff27973bf122952592105a830541726d79a (diff)
Merge pull request #24382 from BastiaanOlij/fix_highp_lens_gles2
Fix highp issue in lens shader on gles2
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles2/shaders/lens_distorted.glsl16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gles2/shaders/lens_distorted.glsl b/drivers/gles2/shaders/lens_distorted.glsl
index d541db9bf9..efa35adf7d 100644
--- a/drivers/gles2/shaders/lens_distorted.glsl
+++ b/drivers/gles2/shaders/lens_distorted.glsl
@@ -1,6 +1,14 @@
/* clang-format off */
[vertex]
+#ifdef USE_GLES_OVER_GL
+#define mediump
+#define highp
+#else
+precision highp float;
+precision highp int;
+#endif
+
attribute highp vec2 vertex; // attrib:0
/* clang-format on */
@@ -20,6 +28,14 @@ void main() {
/* clang-format off */
[fragment]
+#ifdef USE_GLES_OVER_GL
+#define mediump
+#define highp
+#else
+precision mediump float;
+precision highp int;
+#endif
+
uniform sampler2D source; //texunit:0
/* clang-format on */