diff options
author | LaG1924 <lag1924@gmail.com> | 2021-12-19 13:00:13 +0100 |
---|---|---|
committer | LaG1924 <lag1924@gmail.com> | 2021-12-19 13:00:13 +0100 |
commit | bac80e3514f93055daa4e743fa4f8ba177f77311 (patch) | |
tree | 1defef5e53fa99d4e5fdd2fc32cfb8bc7128c18c /cwd | |
parent | Added AO mask (diff) | |
download | AltCraft-bac80e3514f93055daa4e743fa4f8ba177f77311.tar AltCraft-bac80e3514f93055daa4e743fa4f8ba177f77311.tar.gz AltCraft-bac80e3514f93055daa4e743fa4f8ba177f77311.tar.bz2 AltCraft-bac80e3514f93055daa4e743fa4f8ba177f77311.tar.lz AltCraft-bac80e3514f93055daa4e743fa4f8ba177f77311.tar.xz AltCraft-bac80e3514f93055daa4e743fa4f8ba177f77311.tar.zst AltCraft-bac80e3514f93055daa4e743fa4f8ba177f77311.zip |
Diffstat (limited to 'cwd')
-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; } |