GRK/cw 4/shaders/shader_4_1.frag

22 lines
293 B
GLSL
Raw Normal View History

2022-01-12 16:07:16 +01:00
#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);
}