summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft/shaders/vert
diff options
context:
space:
mode:
Diffstat (limited to 'cwd/assets/altcraft/shaders/vert')
-rw-r--r--cwd/assets/altcraft/shaders/vert/face.vs8
1 files changed, 4 insertions, 4 deletions
diff --git a/cwd/assets/altcraft/shaders/vert/face.vs b/cwd/assets/altcraft/shaders/vert/face.vs
index e1f01fc..bea9228 100644
--- a/cwd/assets/altcraft/shaders/vert/face.vs
+++ b/cwd/assets/altcraft/shaders/vert/face.vs
@@ -1,9 +1,9 @@
#version 330 core
-layout (location = 0) in vec4 position[4];
+layout (location = 0) in vec3 position[4];
layout (location = 4) in vec2 uv[4];
layout (location = 8) in float uvLayer;
-layout (location = 9) in vec2 animation;
+layout (location = 9) in float animation;
layout (location = 10) in vec3 color;
layout (location = 11) in vec2 light;
@@ -17,9 +17,9 @@ uniform float GlobalTime;
uniform mat4 projView;
void main() {
- gl_Position = projView * position[gl_VertexID];
+ gl_Position = projView * vec4(position[gl_VertexID], 1.0f);
vs_out.Color = color;
vs_out.Light = light;
vs_out.Texture = vec3(uv[gl_VertexID], uvLayer);
- vs_out.Texture.y -= animation.x * trunc(mod(GlobalTime * 4.0f, animation.y));
+ vs_out.Texture.y -= (uv[2].y - uv[0].y) * trunc(mod(GlobalTime * 4.0f, animation));
}