strafe-client/src/frag.glsl
Quaternions 1a8bdef575 teapot
starting point is teapot from the vulkano examples
2023-07-21 00:59:45 -07: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);
}