summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft/shaders/vert
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-11-21 10:57:57 +0100
committerLaG1924 <lag1924@gmail.com>2021-11-21 10:57:57 +0100
commitf16c897522b6418c399b5699f8378a25c2e5de4f (patch)
tree9fd1490645de30330b6ae84eebd1fe961c3f1e52 /cwd/assets/altcraft/shaders/vert
parentAdded Gbuffer (diff)
downloadAltCraft-f16c897522b6418c399b5699f8378a25c2e5de4f.tar
AltCraft-f16c897522b6418c399b5699f8378a25c2e5de4f.tar.gz
AltCraft-f16c897522b6418c399b5699f8378a25c2e5de4f.tar.bz2
AltCraft-f16c897522b6418c399b5699f8378a25c2e5de4f.tar.lz
AltCraft-f16c897522b6418c399b5699f8378a25c2e5de4f.tar.xz
AltCraft-f16c897522b6418c399b5699f8378a25c2e5de4f.tar.zst
AltCraft-f16c897522b6418c399b5699f8378a25c2e5de4f.zip
Diffstat (limited to 'cwd/assets/altcraft/shaders/vert')
-rw-r--r--cwd/assets/altcraft/shaders/vert/face.vs15
1 files changed, 9 insertions, 6 deletions
diff --git a/cwd/assets/altcraft/shaders/vert/face.vs b/cwd/assets/altcraft/shaders/vert/face.vs
index 93e623d..21f7110 100644
--- a/cwd/assets/altcraft/shaders/vert/face.vs
+++ b/cwd/assets/altcraft/shaders/vert/face.vs
@@ -1,15 +1,17 @@
#version 330 core
-layout (location = 0) in vec3 position[4];
-layout (location = 4) in vec2 uv[4];
-layout (location = 8) in float uvLayer;
-layout (location = 9) in float animation;
-layout (location = 10) in vec3 color;
-layout (location = 11) in vec2 light;
+in vec3 position[4];
+in vec3 normal;
+in vec2 uv[4];
+in float uvLayer;
+in float animation;
+in vec3 color;
+in vec2 light;
out VS_OUT {
vec3 Texture;
vec3 Color;
+ vec3 faceNormal;
} vs_out;
uniform float GlobalTime;
@@ -24,4 +26,5 @@ void main() {
float faceLight = clamp(light.x / 15.0 + (light.y / 15.0) * DayTime, MinLightLevel, 1.0);
vs_out.Color = mix(color.rgb * faceLight, vec3(1,1,1) * faceLight, float(color == vec3(0,0,0)));
+ vs_out.faceNormal = normal;
}