diff options
author | Graham Linden <graham@lindenlab.com> | 2019-06-03 11:30:41 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-06-03 11:30:41 -0700 |
commit | 16d3279995bcb4a4766b721d0897b3d2199971d5 (patch) | |
tree | 0a64b4323552044cf9e88e12f7c77804f26c0426 /indra/newview/app_settings/shaders/class1/deferred | |
parent | 9d73d103bc137a9de5ccf550b9ceaf61c419179a (diff) |
SL-10966
Fix light atten and transmittance calcs breaking ambient color contrib to fog.
Needs to be tested on DRTSIM-415 or better to get legacy viewer settings that match EEP.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
3 files changed, 6 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudShadowF.glsl index 035e979827..0efde5f949 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cloudShadowF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cloudShadowF.glsl @@ -49,7 +49,6 @@ uniform vec4 cloud_color; uniform float cloud_shadow; uniform float cloud_scale; uniform float cloud_variance; -uniform vec3 ambient; uniform vec3 camPosLocal; uniform vec3 sun_dir; uniform float sun_size; diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl index aed5a9b950..46d09c5aae 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl @@ -50,7 +50,7 @@ uniform vec4 lightnorm; uniform vec4 sunlight_color; uniform vec4 moonlight_color; uniform int sun_up_factor; -uniform vec4 ambient; +uniform vec4 ambient_color; uniform vec4 blue_horizon; uniform vec4 blue_density; uniform float haze_horizon; @@ -145,7 +145,7 @@ void main() temp2.x += .25; // Increase ambient when there are more clouds - vec4 tmpAmbient = ambient; + vec4 tmpAmbient = ambient_color; tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5; // Dim sunlight by cloud shadow percentage diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl index 4603c69f2a..de8327eff3 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl @@ -41,7 +41,7 @@ uniform vec4 lightnorm; uniform vec4 sunlight_color; uniform vec4 moonlight_color; uniform int sun_up_factor; -uniform vec4 ambient; +uniform vec4 ambient_color; uniform vec4 blue_horizon; uniform vec4 blue_density; uniform float haze_horizon; @@ -128,13 +128,13 @@ void main() // Haze color above cloud - vary_HazeColor = ( blue_horizon * blue_weight * (sunlight + ambient) - + (haze_horizon * haze_weight) * (sunlight * temp2.x + ambient) + vary_HazeColor = ( blue_horizon * blue_weight * (sunlight + ambient_color) + + (haze_horizon * haze_weight) * (sunlight * temp2.x + ambient_color) ); // Increase ambient when there are more clouds - vec4 tmpAmbient = ambient; + vec4 tmpAmbient = ambient_color; tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5; // Dim sunlight by cloud shadow percentage |