2022-02-11 21:24:15 +00:00
|
|
|
#version 460 core
|
|
|
|
layout (location=0) in vec3 aPos;
|
2022-02-13 13:38:39 +00:00
|
|
|
layout (location=1) in vec3 aNormal;
|
2022-02-16 18:46:19 +00:00
|
|
|
layout (location=2) in vec2 aTexCoords;
|
2022-02-11 21:24:15 +00:00
|
|
|
|
2022-02-12 20:38:31 +00:00
|
|
|
uniform mat4 model;
|
|
|
|
uniform mat4 view;
|
|
|
|
uniform mat4 projection;
|
|
|
|
|
2022-02-16 18:46:19 +00:00
|
|
|
out vec2 TexCoords;
|
2022-10-16 18:27:25 +00:00
|
|
|
out vec3 Normal;
|
|
|
|
out vec3 Position;
|
2022-02-13 12:19:54 +00:00
|
|
|
|
2022-02-11 21:24:15 +00:00
|
|
|
|
2022-10-16 18:27:25 +00:00
|
|
|
void main()
|
|
|
|
{
|
|
|
|
Normal = mat3(transpose(inverse(model))) * aNormal;
|
|
|
|
Position = vec3(model* vec4(aPos, 1.0));
|
2022-02-11 21:24:15 +00:00
|
|
|
|
2022-02-16 18:46:19 +00:00
|
|
|
TexCoords = aTexCoords;
|
2022-10-16 18:27:25 +00:00
|
|
|
gl_Position = projection * view * model * vec4(aPos , 1.0);
|
2022-02-11 21:24:15 +00:00
|
|
|
}
|