#version 330

in vec2 vsoTexCoord;
in vec3 vsoNormal;
in vec4 vsoModPos;

uniform vec4 col;
uniform vec3 Lp;

out vec4 fragColor;

bool border(in float a, in float b){
	return (abs(a-b) < 0.05);
}

void main(void) {
	vec3 n = normalize(vsoNormal);
	vec3 Ld = normalize(vsoModPos.xyz - Lp);
	float intensite_incident = clamp(dot(n,-Ld), 0.0, 1.0);
	fragColor = intensite_incident * col;	
}
