mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-25 08:14:20 +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
15 lines
376 B
GLSL
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);
|
|
}
|