aboutsummaryrefslogtreecommitdiff
path: root/client/shaders/3d_interlaced_merge
diff options
context:
space:
mode:
authorVitaliy <numzer0@yandex.ru>2020-10-25 20:01:03 +0300
committerGitHub <noreply@github.com>2020-10-25 18:01:03 +0100
commit707c8c1e95d8db2d84909e7957b4dc9138e05599 (patch)
tree84604fc1868c7b8ca8e977d5dd0485498500cdfe /client/shaders/3d_interlaced_merge
parent33b2c5f5b1c565171296f26395d803b08f4575e9 (diff)
downloadminetest-707c8c1e95d8db2d84909e7957b4dc9138e05599.tar.gz
minetest-707c8c1e95d8db2d84909e7957b4dc9138e05599.tar.bz2
minetest-707c8c1e95d8db2d84909e7957b4dc9138e05599.zip
Shaders for Android (GLES 2) (#10506)
Shader support for OpenGL ES 2 devices (Android) Co-authored-by: sfan5 <sfan5@live.de>
Diffstat (limited to 'client/shaders/3d_interlaced_merge')
-rw-r--r--client/shaders/3d_interlaced_merge/opengl_fragment.glsl4
-rw-r--r--client/shaders/3d_interlaced_merge/opengl_vertex.glsl7
2 files changed, 7 insertions, 4 deletions
diff --git a/client/shaders/3d_interlaced_merge/opengl_fragment.glsl b/client/shaders/3d_interlaced_merge/opengl_fragment.glsl
index 25945ad7f..7cba61b39 100644
--- a/client/shaders/3d_interlaced_merge/opengl_fragment.glsl
+++ b/client/shaders/3d_interlaced_merge/opengl_fragment.glsl
@@ -6,9 +6,11 @@ uniform sampler2D textureFlags;
#define rightImage normalTexture
#define maskImage textureFlags
+varying mediump vec2 varTexCoord;
+
void main(void)
{
- vec2 uv = gl_TexCoord[0].st;
+ vec2 uv = varTexCoord.st;
vec4 left = texture2D(leftImage, uv).rgba;
vec4 right = texture2D(rightImage, uv).rgba;
vec4 mask = texture2D(maskImage, uv).rgba;
diff --git a/client/shaders/3d_interlaced_merge/opengl_vertex.glsl b/client/shaders/3d_interlaced_merge/opengl_vertex.glsl
index 4e0b2b125..860049481 100644
--- a/client/shaders/3d_interlaced_merge/opengl_vertex.glsl
+++ b/client/shaders/3d_interlaced_merge/opengl_vertex.glsl
@@ -1,6 +1,7 @@
+varying mediump vec2 varTexCoord;
+
void main(void)
{
- gl_TexCoord[0] = gl_MultiTexCoord0;
- gl_Position = gl_Vertex;
- gl_FrontColor = gl_BackColor = gl_Color;
+ varTexCoord = inTexCoord0;
+ gl_Position = inVertexPosition;
}