diff options
| author | Graham Linden <graham@lindenlab.com> | 2019-04-18 10:55:01 -0700 | 
|---|---|---|
| committer | Graham Linden <graham@lindenlab.com> | 2019-04-18 10:55:01 -0700 | 
| commit | ebf53108cb8b77eb15c8b16f97bee30d6649e020 (patch) | |
| tree | f6349a1613629712759ee7275d4c1216cbff4311 /indra/newview/app_settings/shaders/class1 | |
| parent | d2419ca3ca5e2cfe321e350e48df31b41d82c605 (diff) | |
SL-10966
Fix use of density and distance multipliers in atmospherics to use original pre-EEP range instead of FS expanded range.
Modify additive calc to restore old behavior (probably reverts fix for "lens flare" bug).
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
| -rw-r--r-- | indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl | 14 | 
1 files changed, 8 insertions, 6 deletions
| diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl index 91760e05bf..d503de6f24 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl @@ -66,9 +66,12 @@ void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, o      vec4 sunlight = (sun_up_factor == 1) ? sunlight_color : moonlight_color;      vec4 light_atten; +    float dens_mul = density_multiplier * 0.5; // get back to original pre-EEP range... +    float dist_mul = distance_multiplier * 0.1; // get back to original pre-EEP range... +      //sunlight attenuation effect (hue and brightness) due to atmosphere      //this is used later for sunlight modulation at various altitudes -    light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y); +    light_atten = (blue_density + vec4(haze_density * 0.25)) * (dens_mul * max_y);          //I had thought blue_density and haze_density should have equal weighting,          //but attenuation due to haze_density tends to seem too strong @@ -86,12 +89,12 @@ void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, o      sunlight *= exp(-light_atten * temp2.y);      // main atmospheric scattering line integral -    temp2.z = Plen * density_multiplier; +    temp2.z = Plen * dens_mul / 2.0f; // 2.0 to get range back to what it was pre-EEP...      // Transparency (-> temp1) -    // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier in a variable because the ati +    // ATI Bugfix -- can't store temp1*temp2.z*dist_mul in a variable because the ati      // compiler gets confused. -    temp1 = exp(-temp1 * temp2.z * distance_multiplier); +    temp1 = exp(-temp1 * temp2.z * dist_mul);      //final atmosphere attenuation factor      atten = temp1.rgb; @@ -135,6 +138,5 @@ void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, o      //brightness of surface both sunlight and ambient      sunlit = sunlight.rgb;      amblit = tmpAmbient.rgb * .25; -    additive  = normalize(additive); -    additive *= vec3(1.0 - exp(-temp2.z * distance_multiplier)) * 0.5; +    additive *= vec3(1.0 - temp1);  } | 
