27 lines
473 B
Forth
27 lines
473 B
Forth
|
#version 460 core
|
||
|
|
||
|
layout (location = 0) in vec3 _pos;
|
||
|
layout (location = 1) in vec3 _norm;
|
||
|
layout (location = 2) in vec2 _tex;
|
||
|
layout (location = 3) in uint _id;
|
||
|
|
||
|
layout (std140) uniform matrices
|
||
|
{
|
||
|
mat4 projection;
|
||
|
mat4 camera;
|
||
|
}
|
||
|
|
||
|
uniform mat4 model;
|
||
|
|
||
|
out vec3 pos;
|
||
|
out vec3 norm;
|
||
|
out vec2 tex;
|
||
|
out vec2 id;
|
||
|
|
||
|
void main() {
|
||
|
gl_Position = projection * camera * model * vec4(_pos, 1.0);
|
||
|
pos = vec3(model * vec4(_pos, 1.0));
|
||
|
norm = _norm;
|
||
|
tex = _tex;
|
||
|
id = _id;
|
||
|
}
|