prefect
7dee30e24c
- explicitly split ambient and diffuse - add renderer.shadowZBias to bias depths in the depth texture and avoid flickering artifacts caused by Z fighting - cantabrian_generated uses new light values so that shadows aren't pitch black This was SVN commit r3508.
12 lines
203 B
GLSL
12 lines
203 B
GLSL
uniform vec3 ambient;
|
|
uniform vec3 sunDir;
|
|
uniform vec3 sunColor;
|
|
|
|
vec3 lighting(vec3 normal)
|
|
{
|
|
vec3 color = ambient;
|
|
float d = max(0.0, -dot(normal, sunDir));
|
|
color += d * sunColor;
|
|
return color;
|
|
}
|