mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
registergloballights now taks a (by default on) cullSceneLights. off for reflection capture as that is presently acting up
This commit is contained in:
parent
0d915b31ae
commit
bd742bbf75
4 changed files with 15 additions and 14 deletions
|
|
@ -198,7 +198,7 @@ void LightManager::setSpecialLight( LightManager::SpecialLightTypesEnum type, Li
|
|||
registerGlobalLight( light, NULL );
|
||||
}
|
||||
|
||||
void LightManager::registerGlobalLights( const Frustum *frustum, bool staticLighting )
|
||||
void LightManager::registerGlobalLights( const Frustum *frustum, bool staticLighting, bool cullSceneLights)
|
||||
{
|
||||
PROFILE_SCOPE( LightManager_RegisterGlobalLights );
|
||||
|
||||
|
|
@ -226,16 +226,17 @@ void LightManager::registerGlobalLights( const Frustum *frustum, bool staticLigh
|
|||
{
|
||||
// Cull the lights using the frustum.
|
||||
getSceneManager()->getContainer()->findObjectList( *frustum, lightMask, &activeLights );
|
||||
|
||||
for (U32 i = 0; i < activeLights.size(); ++i)
|
||||
{
|
||||
if (!getSceneManager()->mRenderedObjectsList.contains(activeLights[i]))
|
||||
{
|
||||
activeLights.erase(i);
|
||||
--i;
|
||||
}
|
||||
}
|
||||
|
||||
if (cullSceneLights)
|
||||
{
|
||||
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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue