From 690b8f3c47de10328e5172feeffedd11e6563912 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Thu, 29 Nov 2018 12:21:28 -0600 Subject: [PATCH] 'better' (read here less completely craptacular) blending for boxes --- .../common/lighting/advanced/reflectionProbeP.hlsl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeP.hlsl b/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeP.hlsl index 6ea1ba010..b6e838de9 100644 --- a/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeP.hlsl +++ b/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeP.hlsl @@ -115,16 +115,17 @@ float4 main( ConvexConnectP IN ) : SV_TARGET if(useSphereMode) { float3 L = probeWSPos - surface.P; - blendVal = 1.0-length(L)/radius; + blendVal = 1.0-length(L)/radius; + clip(blendVal); } else { float tempAttenVal = 3.5; blendVal = defineBoxSpaceInfluence(surface.P, probeWSPos, radius, tempAttenVal); + clip(blendVal); + float compression = 0.05; + blendVal=(1.0-compression)+blendVal*compression; } - clip(blendVal); - - //render into the bound space defined above float3 surfToEye = normalize(surface.P - eyePosWorld); float3 irradiance = TORQUE_TEXCUBELOD(irradianceCubemap, float4(surface.N,0)).xyz;