mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-21 22:34:43 +00:00
4c515a81cb
* Make each example its own workspace member * Fix runtime-shader example * Fix shader-include example * Fix teapot example * Fix `run_all.sh` * Fix output files getting saved in cwd * Fix spelling for examples readme filename * Remove wrong leftover dependencies for gl-interop * Fix pipeline-cache example * Clearer .gitignore * Help cargo be less useless
19 lines
432 B
GLSL
19 lines
432 B
GLSL
#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);
|
|
}
|