mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 19:53:48 +00:00
refbox calc parity, and killed off some doubled up alpha subtraction
This commit is contained in:
parent
d67501a24e
commit
941d8c7eec
3 changed files with 7 additions and 14 deletions
|
|
@ -639,8 +639,8 @@ void RenderProbeMgr::_update4ProbeConsts(const SceneData &sgData,
|
|||
probeWorldToObjArray[effectiveProbeCount] = curEntry.getTransform();
|
||||
|
||||
Point3F refPos = curEntry.getPosition() + curEntry.mProbeRefOffset;
|
||||
Point3F refBoxMin = refPos - curEntry.mProbeRefScale * curEntry.getTransform().getScale();
|
||||
Point3F refBoxMax = refPos + curEntry.mProbeRefScale * curEntry.getTransform().getScale();
|
||||
Point3F refBoxMin = refPos - curEntry.mProbeRefScale/2 * curEntry.getTransform().getScale();
|
||||
Point3F refBoxMax = refPos + curEntry.mProbeRefScale/2 * curEntry.getTransform().getScale();
|
||||
|
||||
refBoxMinArray[mEffectiveProbeCount] = Point4F(refBoxMin.x, refBoxMin.y, refBoxMin.z, 0);
|
||||
refBoxMaxArray[mEffectiveProbeCount] = Point4F(refBoxMax.x, refBoxMax.y, refBoxMax.z, 0);
|
||||
|
|
|
|||
|
|
@ -385,11 +385,8 @@ float4 computeForwardProbes(Surface surface,
|
|||
{
|
||||
blendFactor[i] *= invBlendSumWeighted;
|
||||
contribution[i] *= blendFactor[i];
|
||||
alpha -= contribution[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
alpha -= blendSum;
|
||||
|
||||
#if DEBUGVIZ_ATTENUATION == 1
|
||||
float contribAlpha = 1;
|
||||
|
|
@ -432,7 +429,7 @@ float4 computeForwardProbes(Surface surface,
|
|||
for (i = 0; i < numProbes; ++i)
|
||||
{
|
||||
float contrib = contribution[i];
|
||||
if (contrib != 0)
|
||||
if (contrib > 0.0f)
|
||||
{
|
||||
int cubemapIdx = probeConfigData[i].a;
|
||||
float3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], refBoxMinArray[i].xyz, refBoxMaxArray[i].xyz, inRefPosArray[i].xyz);
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
|||
//Set up our struct data
|
||||
float contribution[MAX_PROBES];
|
||||
|
||||
//if (alpha > 0)
|
||||
//{
|
||||
if (alpha > 0)
|
||||
{
|
||||
//Process prooooobes
|
||||
for (i = 0; i < numProbes; ++i)
|
||||
{
|
||||
|
|
@ -113,11 +113,8 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
|||
{
|
||||
blendFactor[i] *= invBlendSumWeighted;
|
||||
contribution[i] *= blendFactor[i];
|
||||
alpha -= contribution[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
alpha -= blendSum;
|
||||
|
||||
#if DEBUGVIZ_ATTENUATION == 1
|
||||
float contribAlpha = 1;
|
||||
|
|
@ -144,7 +141,7 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
|||
|
||||
return float4(finalContribColor, 1);
|
||||
#endif
|
||||
//}
|
||||
}
|
||||
#endif
|
||||
|
||||
float3 irradiance = float3(0, 0, 0);
|
||||
|
|
@ -158,11 +155,10 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
|||
#endif
|
||||
|
||||
#if SKYLIGHT_ONLY == 0
|
||||
alpha = 1;
|
||||
for (i = 0; i < numProbes; ++i)
|
||||
{
|
||||
float contrib = contribution[i];
|
||||
if (contrib != 0)
|
||||
if (contrib > 0.0f)
|
||||
{
|
||||
int cubemapIdx = probeConfigData[i].a;
|
||||
float3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], refBoxMinArray[i].xyz, refBoxMaxArray[i].xyz, inRefPosArray[i].xyz);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue