foliage windy shader
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / light_clearskies.glsl
index 0af3be0774ff0899ff6de75e026a85180c49b815..1bd2469ccb772a0539c618b56e8463d3f7a10c92 100644 (file)
@@ -107,8 +107,9 @@ vec3 clearskies_lighting( vec3 normal, float shadow, vec3 halfview )
                                g_sunset_phase );
 
    vec3  sky_reflection = 0.5 * fresnel * reflect_colour;
-   vec3  light_sun      = max(0.0,dot(normal,g_sun_dir.xyz)*0.75+0.25) 
-                           * g_sun_colour.rgb * g_day_phase;
+   vec3  light_sun      = max( CLEARSKIES_LIGHT_DOT_MIN, 
+                               dot(normal,g_sun_dir.xyz)*0.75+0.25
+                           ) * g_sun_colour.rgb * g_day_phase;
 
    float scaled_shadow = max( shadow, 1.0 - max(g_sun_dir.y,0.0) );
    vec3 ambient = mix( g_ambient_colour.rgb, g_sunset_ambient.rgb,