vulkano/examples/teapot/frag.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

15 lines
376 B
GLSL

#version 450
layout(location = 0) in vec3 v_normal;
layout(location = 0) out vec4 f_color;
const vec3 LIGHT = vec3(0.0, 0.0, 1.0);
void main() {
float brightness = dot(normalize(v_normal), normalize(LIGHT));
vec3 dark_color = vec3(0.6, 0.0, 0.0);
vec3 regular_color = vec3(1.0, 0.0, 0.0);
f_color = vec4(mix(dark_color, regular_color, brightness), 1.0);
}