2019-02-04 18:32:08 +01:00
|
|
|
#version 430 core
|
|
|
|
|
|
|
|
in layout(location = 0) vec3 position;
|
|
|
|
in layout(location = 1) vec3 normal_in;
|
|
|
|
|
|
|
|
uniform layout(location = 3) mat4 MVP;
|
2019-02-19 16:16:13 +01:00
|
|
|
uniform layout(location = 4) mat4 MV;
|
|
|
|
uniform layout(location = 5) mat4 MVnormal;
|
|
|
|
|
2019-02-04 18:32:08 +01:00
|
|
|
|
|
|
|
out layout(location = 0) vec3 normal_out;
|
2019-02-19 16:16:13 +01:00
|
|
|
out layout(location = 1) vec3 vertex_out;
|
2019-02-04 18:32:08 +01:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2019-02-19 16:16:13 +01:00
|
|
|
normal_out = normalize(vec3(MVnormal * vec4(normal_in, 1.0f)));
|
|
|
|
vertex_out = vec3(MV*vec4(position, 1.0f));
|
|
|
|
gl_Position = MVP * vec4(position, 1.0f);
|
2019-02-04 18:32:08 +01:00
|
|
|
}
|