blob: c169fceb887cfb501a37fd0a4dc00a7617f82bf6 (
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
26
27
28
29
30
31
|
void applyScatter(inout vec3 color);
uniform sampler2D diffuseMap;
void default_lighting()
{
vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
//applyScatter(color.rgb);
gl_FragColor = color;
}
void alpha_lighting()
{
default_lighting();
}
void water_lighting(inout vec3 diff)
{
applyScatter(diff);
}
void terrain_lighting(inout vec3 color)
{
color.rgb *= gl_Color.rgb;
applyScatter(color);
}
vec4 getLightColor()
{
return gl_Color;
}
|