2022-12-20 12:50:32 +00:00
|
|
|
#version 420 core
|
|
|
|
|
|
|
|
layout(location = 0) in vec3 pos;
|
|
|
|
|
|
|
|
layout(std140, binding = 0) uniform Camera
|
|
|
|
{
|
|
|
|
mat4 projection;
|
|
|
|
mat4 view;
|
|
|
|
vec3 position;
|
|
|
|
} camera;
|
|
|
|
|
|
|
|
uniform mat4 model;
|
|
|
|
|
2022-12-20 12:58:42 +00:00
|
|
|
out vec3 pos_local;
|
|
|
|
|
2022-12-20 12:50:32 +00:00
|
|
|
void main()
|
|
|
|
{
|
2022-12-20 12:58:42 +00:00
|
|
|
pos_local = pos;
|
2022-12-20 12:50:32 +00:00
|
|
|
gl_Position = camera.projection * camera.view * model * vec4(pos, 1.0);
|
|
|
|
}
|