From 7923f255b6815f2a687ef1fbaad5ef11465d6756 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Thu, 25 Aug 2022 10:45:12 -0700 Subject: SL-17702: PBR: Fix light bleed out of range --- .../app_settings/shaders/class3/deferred/multiPointLightF.glsl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/app_settings/shaders/class3/deferred') diff --git a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl index 1175f3e644..91d041cafa 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl @@ -76,6 +76,10 @@ void main() vec3 final_color = vec3(0, 0, 0); vec2 tc = getScreenXY(vary_fragcoord); vec3 pos = getPosition(tc).xyz; + if (pos.z < far_z) + { + discard; + } float envIntensity; // not used for this shader vec3 n; @@ -124,10 +128,6 @@ void main() } else { - if (pos.z < far_z) - { - discard; - } float noise = texture2D(noiseMap, tc/128.0).b; -- cgit v1.2.3