]> git.lizzy.rs Git - dragonblocks_alpha.git/blobdiff - shaders/3d/vertex.glsl
Add diffuse lighting, improve skybox and add timelapse
[dragonblocks_alpha.git] / shaders / 3d / vertex.glsl
index 7226cb7a2385c27ba0214204ea71c8fc5e8b3adf..4417addba682b314c55c7972c582f68d0bb187b0 100755 (executable)
@@ -1,8 +1,10 @@
 layout(location = 0) in vec3 vertexPosition;
-layout(location = 1) in float vertexTextureIndex;
-layout(location = 2) in vec2 vertexTextureCoords;
-layout(location = 3) in vec3 vertexColor;
+layout(location = 1) in vec3 vertexNormal;
+layout(location = 2) in float vertexTextureIndex;
+layout(location = 3) in vec2 vertexTextureCoords;
+layout(location = 4) in vec3 vertexColor;
 
+out vec3 fragmentNormal;
 out float fragmentTextureIndex;
 out vec2 fragmentTextureCoords;
 out vec3 fragmentColor;
@@ -13,6 +15,7 @@ void main()
 {
        gl_Position = MVP * vec4(vertexPosition, 1.0);
 
+       fragmentNormal = vertexNormal;
        fragmentTextureIndex = vertexTextureIndex;
        fragmentTextureCoords = vertexTextureCoords;
        fragmentColor = vertexColor;