suggested alterations to the probe.worldToLocal math feeding and usage (and a divnull safety for attenuation)

This commit is contained in:
Azaezel 2019-03-17 20:14:58 -05:00
parent 3afbdff871
commit edcdd21379
2 changed files with 10 additions and 3 deletions

View file

@ -344,7 +344,14 @@ void RenderProbeMgr::_setupStaticParameters()
probePositionsData[mEffectiveProbeCount] = Point4F(probePos.x, probePos.y, probePos.z,0);
probeRefPositionsData[mEffectiveProbeCount] = Point4F(refPos.x, refPos.y, refPos.z, 0);
probeWorldToObjData[mEffectiveProbeCount] = curEntry.getTransform();
Point3F projectScale=curEntry.mBounds.getExtents();
MatrixF transform = curEntry.getTransform();
transform.scale(projectScale);
//transform.setPosition(curEntry.getTransform().getPosition());
transform.fullInverse();
//transform.transpose();
probeWorldToObjData[mEffectiveProbeCount] = transform;// curEntry.getTransform();
Point3F bbMin = refPos - curEntry.mProbeRefScale/2;
Point3F bbMax = refPos + curEntry.mProbeRefScale/2;
probeBBMinData[mEffectiveProbeCount] = Point4F(bbMin.x, bbMin.y, bbMin.z, 0);