aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorVitaliy <numzer0@yandex.ru>2020-12-22 16:53:52 +0300
committerGitHub <noreply@github.com>2020-12-22 14:53:52 +0100
commit03540e7140fc5d54e7b8406415b53e708c7b0bea (patch)
treea3926d399a6c67e48d704d5b7afc951b3bcd9302 /client
parentaf22dd86e3867a35e9e5ab911faa6e1e7671729d (diff)
downloadminetest-03540e7140fc5d54e7b8406415b53e708c7b0bea.tar.gz
minetest-03540e7140fc5d54e7b8406415b53e708c7b0bea.tar.bz2
minetest-03540e7140fc5d54e7b8406415b53e708c7b0bea.zip
Fix GLES shader support after #9247 (#10727)
Diffstat (limited to 'client')
-rw-r--r--client/shaders/nodes_shader/opengl_fragment.glsl6
-rw-r--r--client/shaders/nodes_shader/opengl_vertex.glsl6
-rw-r--r--client/shaders/object_shader/opengl_fragment.glsl6
-rw-r--r--client/shaders/object_shader/opengl_vertex.glsl6
4 files changed, 20 insertions, 4 deletions
diff --git a/client/shaders/nodes_shader/opengl_fragment.glsl b/client/shaders/nodes_shader/opengl_fragment.glsl
index b5d85da64..b58095063 100644
--- a/client/shaders/nodes_shader/opengl_fragment.glsl
+++ b/client/shaders/nodes_shader/opengl_fragment.glsl
@@ -16,7 +16,11 @@ varying vec3 vPosition;
// precision must be considered).
varying vec3 worldPosition;
varying lowp vec4 varColor;
-centroid varying mediump vec2 varTexCoord;
+#ifdef GL_ES
+varying mediump vec2 varTexCoord;
+#else
+centroid varying vec2 varTexCoord;
+#endif
varying vec3 eyeVec;
const float fogStart = FOG_START;
diff --git a/client/shaders/nodes_shader/opengl_vertex.glsl b/client/shaders/nodes_shader/opengl_vertex.glsl
index 5742ec1d3..c68df4a8e 100644
--- a/client/shaders/nodes_shader/opengl_vertex.glsl
+++ b/client/shaders/nodes_shader/opengl_vertex.glsl
@@ -19,7 +19,11 @@ varying lowp vec4 varColor;
// The centroid keyword ensures that after interpolation the texture coordinates
// lie within the same bounds when MSAA is en- and disabled.
// This fixes the stripes problem with nearest-neighbour textures and MSAA.
-centroid varying mediump vec2 varTexCoord;
+#ifdef GL_ES
+varying mediump vec2 varTexCoord;
+#else
+centroid varying vec2 varTexCoord;
+#endif
varying vec3 eyeVec;
// Color of the light emitted by the light sources.
diff --git a/client/shaders/object_shader/opengl_fragment.glsl b/client/shaders/object_shader/opengl_fragment.glsl
index 12cc54ae7..9a81d8185 100644
--- a/client/shaders/object_shader/opengl_fragment.glsl
+++ b/client/shaders/object_shader/opengl_fragment.glsl
@@ -9,7 +9,11 @@ varying vec3 vNormal;
varying vec3 vPosition;
varying vec3 worldPosition;
varying lowp vec4 varColor;
-centroid varying mediump vec2 varTexCoord;
+#ifdef GL_ES
+varying mediump vec2 varTexCoord;
+#else
+centroid varying vec2 varTexCoord;
+#endif
varying vec3 eyeVec;
varying float vIDiff;
diff --git a/client/shaders/object_shader/opengl_vertex.glsl b/client/shaders/object_shader/opengl_vertex.glsl
index f31b842ee..b4a4d0aaa 100644
--- a/client/shaders/object_shader/opengl_vertex.glsl
+++ b/client/shaders/object_shader/opengl_vertex.glsl
@@ -7,7 +7,11 @@ varying vec3 vNormal;
varying vec3 vPosition;
varying vec3 worldPosition;
varying lowp vec4 varColor;
-centroid varying mediump vec2 varTexCoord;
+#ifdef GL_ES
+varying mediump vec2 varTexCoord;
+#else
+centroid varying vec2 varTexCoord;
+#endif
varying vec3 eyeVec;
varying float vIDiff;