From d001c52c346d957375afc36bd83550a5702d4727 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 29 Sep 2022 19:24:08 -0500 Subject: SL-18132 Fix for errant shadow when sun shadows are disabled. --- .../app_settings/shaders/class3/deferred/softenLightF.glsl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (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 7635897db1..3e44e87f1e 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -119,10 +119,16 @@ void main() #if defined(HAS_SUN_SHADOW) || defined(HAS_SSAO) vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg; +#endif + +#if defined(HAS_SUN_SHADOW) float scol = max(scol_ambocc.r, diffuse.a); - float ambocc = scol_ambocc.g; #else float scol = 1.0; +#endif +#if defined(HAS_SSAO) + float ambocc = scol_ambocc.g; +#else float ambocc = 1.0; #endif -- cgit v1.2.3