GRK/cw 4/shaders/shader_4_1.frag
secret_dude a7bd7ecb75 master
2022-01-12 16:07:16 +01:00

22 lines
293 B
GLSL

#version 430 core
uniform vec3 objectColor;
uniform vec3 lightDir;
in vec3 interpNormal;
void main()
{
normalize(interpNormal);
vec3 intensity = vec3(dot(interpNormal, 1 - lightDir));
normalize(intensity);
vec3 color = objectColor * intensity;
gl_FragColor = vec4(color, 1.0);
}