18 lines
343 B
GLSL
18 lines
343 B
GLSL
#version 450
|
|
|
|
layout(location = 0) in vec3 position;
|
|
layout(location = 1) in vec3 normal;
|
|
|
|
layout(location = 0) out vec3 frag_normal;
|
|
|
|
layout(push_constant) uniform MVP {
|
|
mat4 model;
|
|
mat4 view;
|
|
mat4 proj;
|
|
} mvp;
|
|
|
|
void main() {
|
|
gl_Position = mvp.proj * mvp.view * mvp.model * vec4(position, 1.0);
|
|
frag_normal = mat3(mvp.model) * normal;
|
|
}
|