blob: c20035d6e2a423cbda1aafbf47485dd957b96dbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#version 130
in vec2 texCoord0;
in vec3 normal0;
uniform sampler2D sampler;
uniform vec3 lightDirection;
uniform vec3 lightColor;
uniform vec3 ambientColor;
void main()
{
gl_FragColor = texture(sampler, texCoord0);
gl_FragColor.rgb *= clamp(ambientColor + (dot(-lightDirection, normal0) * lightColor), 0.0, 1.0);
}
|