#2397 Sanity clamp haze contribution to avoid NaN like blowouts. (#2402)

master
Dave Parks 2024-08-22 15:59:22 -05:00 committed by GitHub
parent 33c7a879c1
commit 25c4ba3a76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -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);