]> git.localhorst.tv Git - tacos-assets.git/blob - shader/floor.vertex.glsl
floor shader
[tacos-assets.git] / shader / floor.vertex.glsl
1 #version 330 core
2
3 layout(location = 0) in vec3 vert_position;
4 layout(location = 1) in vec3 vert_normal;
5
6 uniform mat4 MV;
7 uniform mat4 MVP;
8
9 out vec3 view_position;
10 out vec3 view_normal;
11
12 void main() {
13         gl_Position = MVP * vec4(vert_position, 1.0);
14         view_position = (MV * vec4(vert_position, 1.0)).xyz;
15         view_normal = mat3(MV) * vert_normal;
16 }