mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Added deletion tracking so when we delete a probe, it'll delete the prefilter/irrad bakes if they exist.
WIP of static cubemap bake(not working).
This commit is contained in:
parent
1766e291ba
commit
1fc38d496f
5 changed files with 106 additions and 78 deletions
|
|
@ -225,18 +225,20 @@ void LightManager::registerGlobalLights( const Frustum *frustum, bool staticLigh
|
|||
else
|
||||
{
|
||||
// Cull the lights using the frustum.
|
||||
getSceneManager()->getContainer()->findObjectList( *frustum, lightMask, &activeLights );
|
||||
if (enableZoneLightCulling)
|
||||
{
|
||||
for (U32 i = 0; i < activeLights.size(); ++i)
|
||||
{
|
||||
if (!getSceneManager()->mRenderedObjectsList.contains(activeLights[i]))
|
||||
{
|
||||
activeLights.erase(i);
|
||||
--i;
|
||||
}
|
||||
}
|
||||
}
|
||||
getSceneManager()->getContainer()->findObjectList(*frustum, lightMask, &activeLights);
|
||||
|
||||
if (enableZoneLightCulling)
|
||||
{
|
||||
for (U32 i = 0; i < activeLights.size(); ++i)
|
||||
{
|
||||
if (!getSceneManager()->mRenderedObjectsList.contains(activeLights[i]))
|
||||
{
|
||||
activeLights.erase(i);
|
||||
--i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Store the culling position for sun placement
|
||||
// later... see setSpecialLight.
|
||||
mCullPos = frustum->getPosition();
|
||||
|
|
@ -246,10 +248,10 @@ void LightManager::registerGlobalLights( const Frustum *frustum, bool staticLigh
|
|||
// the shape bounds and can often get culled.
|
||||
|
||||
GameConnection *conn = GameConnection::getConnectionToServer();
|
||||
if ( conn->getControlObject() )
|
||||
if (conn->getControlObject())
|
||||
{
|
||||
GameBase *conObject = conn->getControlObject();
|
||||
activeLights.push_back_unique( conObject );
|
||||
activeLights.push_back_unique(conObject);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue