Grafika_2024/projekt_grk/shaders/shader_coin.frag

21 lines
352 B
GLSL
Raw Normal View History

#version 430 core
in vec3 FragPos;
in vec3 Normal;
out vec4 FragColor;
uniform vec3 color;
void main()
{
vec3 lightColor = vec3(1.0, 1.0, 1.0);
vec3 lightDir = normalize(vec3(1.0, 1.0, 1.0));
float diff = max(dot(normalize(Normal), lightDir), 0.0);
vec3 diffuse = diff * lightColor;
FragColor = vec4(color * diffuse, 1.0);
}