diff options
author | Graham Linden <graham@lindenlab.com> | 2019-04-30 10:04:20 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-04-30 10:04:20 -0700 |
commit | bfce96d684d5d056061ce16a36daba9a2bd0aa9d (patch) | |
tree | 440c0f2cbacf246d3759fd94472e028f60b7011b /indra/newview | |
parent | 6b925711948f69b5361efa3f674b8c9e1b9f6bb4 (diff) |
SL-10856
Remove ambient clamp to keep shadows dark.
Partial fix for class 3 ambient term being wrong.
Diffstat (limited to 'indra/newview')
5 files changed, 3 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index 1acb76bdd1..ae579d7f85 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -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; diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index cbb7a04631..f7af3647a1 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -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; diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index afdd8cdda3..bcd93d9a2d 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -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; diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index 06a76668ba..7368b8d80c 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -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; diff --git a/indra/newview/app_settings/shaders/class3/lighting/lightV.glsl b/indra/newview/app_settings/shaders/class3/lighting/lightV.glsl index 1ac0ad8948..f5428077fa 100644 --- a/indra/newview/app_settings/shaders/class3/lighting/lightV.glsl +++ b/indra/newview/app_settings/shaders/class3/lighting/lightV.glsl @@ -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; } |