From 25c4ba3a76c3dd81bb9554abf27ab3cbe5dcd95d Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 22 Aug 2024 15:59:22 -0500 Subject: #2397 Sanity clamp haze contribution to avoid NaN like blowouts. (#2402) --- .../app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra') diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl index 55daa83750..359bfe8253 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl @@ -124,6 +124,9 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou amblit = tmpAmbient; additive *= vec3(1.0 - combined_haze); + + // sanity clamp haze contribution + additive = min(additive, vec3(10)); } vec3 srgb_to_linear(vec3 col); -- cgit v1.2.3