blob: 4eacd08d5af0ac7a7e898340b5030663b0a400e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef USE_INSTANCE_COLOR
uniform vec4 color;
#endif
uniform vec3 light;
#if __VERSION__ == 120
varying vec3 normal;
#ifdef USE_INSTANCE_COLOR
varying vec4 finalColor;
#endif
#define fragColor gl_FragColor
#else
in vec3 normal;
#ifdef USE_INSTANCE_COLOR
flat in vec4 finalColor;
#define color finalColor
#endif
out vec4 fragColor;
#endif
void main()
{
fragColor = color * max(0.0, dot(normalize(normal), light));
}
|