vulkano/examples/teapot/vert.glsl
marc0246 4c515a81cb
Improve the examples' directory structure (#2375)
* 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
2023-10-29 18:46:14 +01:00

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);
}