put sphereical influence back via the new spherical attenuation methods, shifted the stateblock for probes specifically to max of either source or desitination alpha (though not entirely convinced that is in fact the case)

This commit is contained in:
Azaezel 2018-11-28 12:00:06 -06:00
parent 8dad81e494
commit d3eb2f7784
2 changed files with 16 additions and 5 deletions

View file

@ -780,7 +780,7 @@ bool ReflectProbeMatInstance::setupPass(SceneRenderState *state, const SceneData
desc.setZReadWrite(false); desc.setZReadWrite(false);
desc.zWriteEnable = false; desc.zWriteEnable = false;
desc.setCullMode(GFXCullNone); desc.setCullMode(GFXCullNone);
desc.setBlend(true, GFXBlendSrcAlpha, GFXBlendInvDestAlpha, GFXBlendOpAdd); desc.setBlend(true, GFXBlendSrcAlpha, GFXBlendDestAlpha, GFXBlendOpMax);
mProjectionState = GFX->createStateBlock(desc); mProjectionState = GFX->createStateBlock(desc);
} }
// Now override stateblock with our own // Now override stateblock with our own

View file

@ -111,10 +111,21 @@ float4 main( ConvexConnectP IN ) : SV_TARGET
//create surface //create surface
Surface surface = createSurface( normDepth, TORQUE_SAMPLER2D_MAKEARG(colorBuffer),TORQUE_SAMPLER2D_MAKEARG(matInfoBuffer), Surface surface = createSurface( normDepth, TORQUE_SAMPLER2D_MAKEARG(colorBuffer),TORQUE_SAMPLER2D_MAKEARG(matInfoBuffer),
uvScene, eyePosWorld, wsEyeRay, cameraToWorld); uvScene, eyePosWorld, wsEyeRay, cameraToWorld);
float blendVal = 1.0;
if(useSphereMode)
{
float3 L = probeWSPos - surface.P;
blendVal = getDistanceAtt(L, radius);
if (length(L)>radius)
blendVal = -1;
float tempAttenVal = 3.5; }
float blendVal = defineBoxSpaceInfluence(surface.P, probeWSPos, radius, tempAttenVal); else
clip(blendVal); {
float tempAttenVal = 3.5;
blendVal = defineBoxSpaceInfluence(surface.P, probeWSPos, radius, tempAttenVal);
}
clip(blendVal);
//render into the bound space defined above //render into the bound space defined above