mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-25 16:25:31 +00:00
19 lines
432 B
Plaintext
19 lines
432 B
Plaintext
|
#version 450
|
||
|
|
||
|
layout(location = 0) in vec3 position;
|
||
|
layout(location = 1) in vec3 normal;
|
||
|
|
||
|
layout(location = 0) out vec3 v_normal;
|
||
|
|
||
|
layout(set = 0, binding = 0) uniform Data {
|
||
|
mat4 world;
|
||
|
mat4 view;
|
||
|
mat4 proj;
|
||
|
} uniforms;
|
||
|
|
||
|
void main() {
|
||
|
mat4 worldview = uniforms.view * uniforms.world;
|
||
|
v_normal = transpose(inverse(mat3(worldview))) * normal;
|
||
|
gl_Position = uniforms.proj * worldview * vec4(position, 1.0);
|
||
|
}
|