Skip to content

Commit 25c4ba3

Browse files
#2397 Sanity clamp haze contribution to avoid NaN like blowouts. (#2402)
1 parent 33c7a87 commit 25c4ba3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou
124124
amblit = tmpAmbient;
125125

126126
additive *= vec3(1.0 - combined_haze);
127+
128+
// sanity clamp haze contribution
129+
additive = min(additive, vec3(10));
127130
}
128131

129132
vec3 srgb_to_linear(vec3 col);

0 commit comments

Comments
 (0)