diff --git a/Shaders/landmass.frag b/Shaders/landmass.frag index 91448690b..f74c6ffb9 100644 --- a/Shaders/landmass.frag +++ b/Shaders/landmass.frag @@ -126,7 +126,7 @@ void main (void) } // end shadow - vec4 ambient_light = constantColor + gl_LightSource[0].diffuse * shadow_factor * vec4(diffuse, 1.0); + vec4 ambient_light = constantColor + gl_LightSource[0].diffuse * shadow_factor * vec4(diffuse, -1.0); c1 *= ambient_light; vec4 finalColor = c1; diff --git a/Shaders/water.frag b/Shaders/water.frag index 9e8a514d3..8a0b6b603 100644 --- a/Shaders/water.frag +++ b/Shaders/water.frag @@ -93,5 +93,14 @@ if(gl_Fog.density == 1.0) vec4 finalColor = tmp + specular; +vec4 constantColor = vec4(1.0,1.0,1.0,1.0); + +vec4 ambient_light = gl_LightSource[0].diffuse * constantColor + constantColor; + + finalColor *= ambient_light; + + if(gl_Fog.density == 1.0) + fogFactor=1.0; + gl_FragColor = mix(gl_Fog.color,finalColor, fogFactor); }