mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
Overhauls the handling of probes to utilize an active probe list to improve performance and allow a greater total number of active probes in a scene.
Also fixes handling of metal materials during bakes to render properly, and fixes a possible double-up return in findObjectByType, which could cause doubling when getting probes in the scene
This commit is contained in:
parent
072b5ecb19
commit
6a3603c737
22 changed files with 490 additions and 610 deletions
|
|
@ -295,7 +295,7 @@ void CubeReflector::unregisterReflector()
|
|||
mEnabled = false;
|
||||
}
|
||||
|
||||
void CubeReflector::updateReflection( const ReflectParams ¶ms )
|
||||
void CubeReflector::updateReflection( const ReflectParams ¶ms, Point3F explicitPostion)
|
||||
{
|
||||
GFXDEBUGEVENT_SCOPE( CubeReflector_UpdateReflection, ColorI::WHITE );
|
||||
|
||||
|
|
@ -336,7 +336,7 @@ void CubeReflector::updateReflection( const ReflectParams ¶ms )
|
|||
|
||||
|
||||
for ( U32 i = 0; i < 6; i++ )
|
||||
updateFace( params, i );
|
||||
updateFace( params, i, explicitPostion);
|
||||
|
||||
|
||||
GFX->popActiveRenderTarget();
|
||||
|
|
@ -347,7 +347,7 @@ void CubeReflector::updateReflection( const ReflectParams ¶ms )
|
|||
mLastTexSize = texDim;
|
||||
}
|
||||
|
||||
void CubeReflector::updateFace( const ReflectParams ¶ms, U32 faceidx )
|
||||
void CubeReflector::updateFace( const ReflectParams ¶ms, U32 faceidx, Point3F explicitPostion)
|
||||
{
|
||||
GFXDEBUGEVENT_SCOPE( CubeReflector_UpdateFace, ColorI::WHITE );
|
||||
|
||||
|
|
@ -402,7 +402,15 @@ void CubeReflector::updateFace( const ReflectParams ¶ms, U32 faceidx )
|
|||
matView.setColumn( 0, cross );
|
||||
matView.setColumn( 1, vLookatPt );
|
||||
matView.setColumn( 2, vUpVec );
|
||||
matView.setPosition( mObject->getPosition() );
|
||||
|
||||
if (explicitPostion == Point3F::Max)
|
||||
{
|
||||
matView.setPosition(mObject->getPosition());
|
||||
}
|
||||
else
|
||||
{
|
||||
matView.setPosition(explicitPostion);
|
||||
}
|
||||
matView.inverse();
|
||||
|
||||
GFX->setWorldMatrix(matView);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue