




















































uniform sampler2D colorMap;
uniform sampler2D normalMap;
uniform vec4 glColor;

void main() {


vec3 normal = normalize(texture2D(normalMap, gl_TexCoord[0].st).rgb * 2.0 - 1.0);

vec3 light_pos = normalize(vec3(1.0, 1.0, 1.5));

float diffuse = max(dot(normal, light_pos), 0.0);

vec3 color = diffuse * texture2D(colorMap, gl_TexCoord[0].st).rgb;

gl_FragColor = vec4(color, 1.0)*glColor;
}





