#version 330 in vec4 pos_model; in vec3 vec_normal; out vec4 fragColor; uniform vec4 couleur; uniform vec4 lumpos; void main() { vec3 torche = normalize(pos_model.xyz - lumpos.xyz); float intensite_eclairage = clamp(dot(vec_normal, -torche), 0, 1); fragColor = intensite_eclairage * couleur; }