Remove ambient clamp to keep shadows dark.

Partial fix for class 3 ambient term being wrong.
meow-7.2.2
Graham Linden 2019-04-30 10:04:20 -07:00
parent 6b92571194
commit bfce96d684
5 changed files with 3 additions and 7 deletions

View File

@ -225,7 +225,6 @@ void main()
float ambient = da;
ambient *= 0.5;
ambient *= ambient;
ambient = max(getAmbientClamp(), ambient); // keeps shadows dark
ambient = 1.0 - ambient;
vec3 sun_contrib = min(final_da, shadow) * sunlit;

View File

@ -323,7 +323,6 @@ void main()
float ambient = da;
ambient *= 0.5;
ambient *= ambient;
ambient = max(getAmbientClamp(), ambient);
ambient = 1.0 - ambient;
vec3 sun_contrib = min(final_da, shadow) * sunlit;

View File

@ -116,7 +116,6 @@ void main()
float ambient = da;
ambient *= 0.5;
ambient *= ambient;
ambient = max(getAmbientClamp(), ambient);
ambient = 1.0 - ambient;
vec3 sun_contrib = final_da * sunlit;

View File

@ -126,7 +126,6 @@ void main()
float ambient = da;
ambient *= 0.5;
ambient *= ambient;
ambient = max(getAmbientClamp(), ambient);
ambient = 1.0 - ambient;
vec3 sun_contrib = scol * final_da * sunlit;

View File

@ -31,8 +31,8 @@ vec4 sumLights(vec3 pos, vec3 norm, vec4 color);
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color)
{
vec4 c = sumLights(pos, norm, color);
c.rgb += atmosAmbient() * color.rgb;
return c * 2.0;
vec4 c = sumLights(pos, norm, color) * 2.0;
c.rgb += atmosAmbient() * color.rgb * 0.5;
return c;
}