diff options
author | Dave Houlton <euclid@lindenlab.com> | 2020-09-16 17:11:01 -0600 |
---|---|---|
committer | Dave Houlton <euclid@lindenlab.com> | 2020-09-16 17:38:56 -0600 |
commit | e8f4017b910ae6276772f540eef80ac0c788cb57 (patch) | |
tree | 702df1071765973e531c1be445fd882907f18437 /indra/newview/app_settings/shaders/class1/windlight | |
parent | c0bbac0676e428bba5020e4c3a156edd63045a86 (diff) |
DRTVWR-4976 Misc shader cleanup.
Removed some potential div-by-0 NaNs and a mangled clamp.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/windlight')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl index 05e6e6a9f9..ea2690ba09 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl @@ -49,7 +49,7 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou vec3 rel_pos = inPositionEye; //(TERRAIN) limit altitude - rel_pos.y = clamp(rel_pos.y, -max_y, max_y); + if (abs(rel_pos.y) > max_y) rel_pos *= (max_y / rel_pos.y); vec3 rel_pos_norm = normalize(rel_pos); float rel_pos_len = length(rel_pos); |