1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 08:05:18 +02:00

Shaders for Android (GLES 2) (#10506)

Shader support for OpenGL ES 2 devices (Android)

Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
Vitaliy
2020-10-25 20:01:03 +03:00
committed by GitHub
parent 33b2c5f5b1
commit 707c8c1e95
17 changed files with 233 additions and 120 deletions

View File

@@ -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;

View File

@@ -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;
}