summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft
diff options
context:
space:
mode:
Diffstat (limited to 'cwd/assets/altcraft')
-rw-r--r--cwd/assets/altcraft/shaders/vert/face.vs9
1 files changed, 3 insertions, 6 deletions
diff --git a/cwd/assets/altcraft/shaders/vert/face.vs b/cwd/assets/altcraft/shaders/vert/face.vs
index 30ae0d7..424e215 100644
--- a/cwd/assets/altcraft/shaders/vert/face.vs
+++ b/cwd/assets/altcraft/shaders/vert/face.vs
@@ -1,9 +1,8 @@
#version 330 core
-layout (location = 0) in vec3 position;
+layout (location = 3) in vec4 position[6];
layout (location = 2) in vec2 UvCoordinates;
-layout (location = 7) in vec4 Texture;
-layout (location = 8) in mat4 model;
+layout (location = 11) in vec4 Texture;
layout (location = 12) in vec3 color;
layout (location = 13) in vec2 light;
layout (location = 14) in float TextureLayer;
@@ -22,7 +21,6 @@ uniform mat4 projView;
vec3 TransformTextureCoord(vec4 TextureAtlasCoords, vec2 UvCoords, float Layer) {
float x = TextureAtlasCoords.x;
float y = TextureAtlasCoords.y;
-// float w = TextureAtlasCoords.z;
float h = TextureAtlasCoords.w;
vec2 transformed = vec2(x, 1 - y - h) + UvCoords * TextureAtlasCoords.zw;
return vec3(transformed.x, transformed.y, Layer);
@@ -30,8 +28,7 @@ vec3 TransformTextureCoord(vec4 TextureAtlasCoords, vec2 UvCoords, float Layer)
void main()
{
- vec4 sourcePosition = vec4(position,1.0f);
- gl_Position = projView * model * sourcePosition;
+ gl_Position = projView * position[gl_VertexID];
vec4 texturePos = Texture;
float frameHeight = texturePos.w / TextureFrames;