From 7ceaa01878c13082a3a803e1d369eaddfea76050 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 25 Aug 2022 15:45:15 -0700 Subject: SL-17703: PBR: Tweak sunlight scaling to better match Substance 3D Stager, don't blow bloom out --- indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/app_settings/shaders/class3/deferred') diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index d4140a0d92..3f21bd0219 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -358,7 +358,8 @@ void main() if (nl > 0.0 || nv > 0.0) { - vec3 sunColor = srgb_to_linear(sunlit * 2.0); // NOTE: *2.0 Midday should have strong sunlight + float scale = 4.9; + vec3 sunColor = srgb_to_linear(sunlit * scale); // NOTE: Midday should have strong sunlight #if DEBUG_PBR_SUN_FULL_BRIGHT sunColor = vec3(1); #endif @@ -366,7 +367,7 @@ void main() vec3 intensity = ambocc * sunColor * nl * scol; vec3 sunDiffuse = intensity * BRDFLambertian (reflect0, reflect90, c_diff , specWeight, vh); vec3 sunSpec = intensity * BRDFSpecularGGX(reflect0, reflect90, alphaRough, specWeight, vh, nl, nv, nh); - bloom = dot(sunSpec, sunSpec) / 8.0; + bloom = dot(sunSpec, sunSpec) / (scale * scale * scale); #if DEBUG_PBR_SUN_SPEC_FRESNEL colorDiffuse = vec3(0); -- cgit v1.2.3