diff --git a/Engine/source/lighting/probeManager.cpp b/Engine/source/lighting/probeManager.cpp index f92cebcca..ec52e544c 100644 --- a/Engine/source/lighting/probeManager.cpp +++ b/Engine/source/lighting/probeManager.cpp @@ -780,7 +780,7 @@ bool ReflectProbeMatInstance::setupPass(SceneRenderState *state, const SceneData desc.setZReadWrite(false); desc.zWriteEnable = false; desc.setCullMode(GFXCullNone); - desc.setBlend(true, GFXBlendSrcAlpha, GFXBlendInvDestAlpha, GFXBlendOpAdd); + desc.setBlend(true, GFXBlendSrcAlpha, GFXBlendDestAlpha, GFXBlendOpMax); mProjectionState = GFX->createStateBlock(desc); } // Now override stateblock with our own diff --git a/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeP.hlsl b/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeP.hlsl index a6296ff5c..71a51ae5e 100644 --- a/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeP.hlsl +++ b/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeP.hlsl @@ -111,10 +111,21 @@ float4 main( ConvexConnectP IN ) : SV_TARGET //create surface Surface surface = createSurface( normDepth, TORQUE_SAMPLER2D_MAKEARG(colorBuffer),TORQUE_SAMPLER2D_MAKEARG(matInfoBuffer), uvScene, eyePosWorld, wsEyeRay, cameraToWorld); - - float tempAttenVal = 3.5; - float blendVal = defineBoxSpaceInfluence(surface.P, probeWSPos, radius, tempAttenVal); - clip(blendVal); + float blendVal = 1.0; + if(useSphereMode) + { + float3 L = probeWSPos - surface.P; + blendVal = getDistanceAtt(L, radius); + if (length(L)>radius) + blendVal = -1; + + } + else + { + float tempAttenVal = 3.5; + blendVal = defineBoxSpaceInfluence(surface.P, probeWSPos, radius, tempAttenVal); + } + clip(blendVal); //render into the bound space defined above