#version 330 core
// The result : color of the fragment.
out vec4 FragColor;


// The input variable from the vertex shader (same name and same type). 
in vec3 color;
in vec2 TexCoords;
uniform float intensity;
uniform vec4 colorDiffuse0; // Input Color.
uniform sampler2D textureDiffuse0;
void main() {

	vec3 ambient = vec3(0.7333, 0.7333, 0.7333);
	vec3 diffuse = color;
    FragColor = intensity * vec4(ambient + diffuse, 1.0)*colorDiffuse0 * texture(textureDiffuse0, TexCoords);
} 