From 003c79132ea55856cafabdf98b5b7fe82502b737 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Wed, 20 Mar 2019 08:38:48 -0500 Subject: [PATCH] simplification --- .../lighting/advanced/reflectionProbeArrayP.hlsl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl b/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl index 99fc1b80d..b1a8b2db7 100644 --- a/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl +++ b/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl @@ -293,13 +293,13 @@ float4 main( PFXVertToPix IN ) : SV_TARGET { if (probes[i].contribution == 0) continue; - - if (probes[i].type < 2) //non-skylight - { - irradiance += iblBoxDiffuse(surface, probes[i]); - specular += F*iblBoxSpecular(surface, probes[i]); - contrib +=probes[i].contribution; - } + + if (probes[i].type == 2) //skip skylight + continue; + + irradiance += iblBoxDiffuse(surface, probes[i]); + specular += F*iblBoxSpecular(surface, probes[i]); + contrib +=probes[i].contribution; } contrib = saturate(contrib); irradiance = lerp(iblSkylightDiffuse(surface, probes[skyID]),irradiance,contrib);