summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2020-07-01 13:27:19 -0700
committerPtolemy <ptolemy@lindenlab.com>2020-07-01 13:42:23 -0700
commitb5739323e1a37b3a59eb738b8620c2e2c02a4c55 (patch)
treeddb6603a616343b53861984d36c9b6b15d2b7b44
parent374652a2d93ad96094c395877d453fc8d6ba8662 (diff)
SL-12978: Fix off-axis water dimming
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl9
1 files changed, 2 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
index dcb02bd1c1..5bb2d18890 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
@@ -81,13 +81,8 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou
haze_weight = vec4(haze_density) / temp1;
//(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
- temp2.y = max(0.0, tmpLightnorm.y);
- if (abs(temp2.y) > 0.000001f)
- {
- temp2.y = 1. / abs(temp2.y);
- }
- temp2.y = max(0.0000001f, temp2.y);
- sunlight *= exp(-light_atten * temp2.y);
+ // SL-12978: temp2.y = 1; optimized away
+ sunlight *= exp(-light_atten);
// main atmospheric scattering line integral
temp2.z = Plen * dens_mul;