From 56bd17a8e9b8c312190b087fc34272f3b4d1fbe3 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Fri, 15 Feb 2019 09:18:03 -0600 Subject: [PATCH] flip sphereical projection back on as an option to support the second class --- .../advanced/reflectionProbeArrayP.hlsl | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl b/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl index ad6dc7158..f19af5865 100644 --- a/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl +++ b/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl @@ -115,22 +115,22 @@ float4 main( PFXVertToPix IN ) : SV_TARGET for(i=0; i < numProbes; i++) { - float3 probeWS = inProbePosArray[i].xyz; - float3 L = probeWS - surface.P; + float3 probeWS = inProbePosArray[i].xyz; + float3 L = probeWS - surface.P; - /*if(useSphereMode[i]) - { - float3 L = inProbePosArray[i].xyz - surface.P; - blendVal[i] = 1.0-length(L)/radius[i]; - blendVal[i] = max(0,blendVal[i]); - } - else - {*/ - blendVal[i] = defineBoxSpaceInfluence(surface, i); - blendVal[i] = max(0,blendVal[i]); - //} + if(useSphereMode[i].r) + { + float3 L = inProbePosArray[i].xyz - surface.P; + blendVal[i] = 1.0-length(L)/radius[i]; + blendVal[i] = max(0,blendVal[i]); + } + else + { + blendVal[i] = defineBoxSpaceInfluence(surface, i); + blendVal[i] = max(0,blendVal[i]); + } blendSum += blendVal[i]; - invBlendSum +=(1.0f - blendVal[i]); + invBlendSum +=(1.0f - blendVal[i]); } // Weight0 = normalized NDF, inverted to have 1 at center, 0 at boundary.