diff options
Diffstat (limited to 'cwd/assets/altcraft/shaders')
-rw-r--r-- | cwd/assets/altcraft/shaders/vert/face.vs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/cwd/assets/altcraft/shaders/vert/face.vs b/cwd/assets/altcraft/shaders/vert/face.vs index d3caf32..101e4d0 100644 --- a/cwd/assets/altcraft/shaders/vert/face.vs +++ b/cwd/assets/altcraft/shaders/vert/face.vs @@ -1,13 +1,11 @@ #version 330 core in vec3 pos[4]; -in vec3 normal; in vec2 uv[4]; -in float uvLayer; -in float animation; +in vec2 light[4]; +in vec3 normal; in vec3 color; -in vec2 light; -in float ambientOcclusion; +in vec3 layerAnimationAo; out vec3 faceTextureUv; out vec3 faceNormal; @@ -30,11 +28,11 @@ layout (std140) uniform Globals { void main() { gl_Position = projView * vec4(pos[gl_VertexID], 1.0f); - faceTextureUv = vec3(uv[gl_VertexID], uvLayer); - faceTextureUv.y -= (uv[2].y - uv[0].y) * trunc(mod(globalTime * 4.0f, animation)); + faceTextureUv = vec3(uv[gl_VertexID], layerAnimationAo.r); + faceTextureUv.y -= (uv[2].y - uv[0].y) * trunc(mod(globalTime * 4.0f, layerAnimationAo.g)); faceNormal = (view * vec4(normal, 0.0f)).xyz; faceAddColor = color; - faceLight = light; - faceAmbientOcclusion = ambientOcclusion; + faceLight = light[gl_VertexID]; + faceAmbientOcclusion = layerAnimationAo.b; } |