mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
retweaked filter for wether ot not to supress the zonelight culling methods when not in the diffuse pass
This commit is contained in:
parent
d86f8b16e8
commit
866ff49993
3 changed files with 4 additions and 4 deletions
|
|
@ -198,7 +198,7 @@ void LightManager::setSpecialLight( LightManager::SpecialLightTypesEnum type, Li
|
||||||
registerGlobalLight( light, NULL );
|
registerGlobalLight( light, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
void LightManager::registerGlobalLights( const Frustum *frustum, bool staticLighting, bool cullSceneLights)
|
void LightManager::registerGlobalLights( const Frustum *frustum, bool staticLighting, bool enableZoneLightCulling)
|
||||||
{
|
{
|
||||||
PROFILE_SCOPE( LightManager_RegisterGlobalLights );
|
PROFILE_SCOPE( LightManager_RegisterGlobalLights );
|
||||||
|
|
||||||
|
|
@ -226,7 +226,7 @@ void LightManager::registerGlobalLights( const Frustum *frustum, bool staticLigh
|
||||||
{
|
{
|
||||||
// Cull the lights using the frustum.
|
// Cull the lights using the frustum.
|
||||||
getSceneManager()->getContainer()->findObjectList( *frustum, lightMask, &activeLights );
|
getSceneManager()->getContainer()->findObjectList( *frustum, lightMask, &activeLights );
|
||||||
if (cullSceneLights)
|
if (enableZoneLightCulling)
|
||||||
{
|
{
|
||||||
for (U32 i = 0; i < activeLights.size(); ++i)
|
for (U32 i = 0; i < activeLights.size(); ++i)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ public:
|
||||||
virtual void registerLocalLight( LightInfo *light );
|
virtual void registerLocalLight( LightInfo *light );
|
||||||
virtual void unregisterLocalLight( LightInfo *light );
|
virtual void unregisterLocalLight( LightInfo *light );
|
||||||
|
|
||||||
virtual void registerGlobalLights( const Frustum *frustum, bool staticlighting, bool cullSceneLights = true );
|
virtual void registerGlobalLights( const Frustum *frustum, bool staticlighting, bool enableZoneLightCulling = false );
|
||||||
virtual void unregisterAllLights();
|
virtual void unregisterAllLights();
|
||||||
|
|
||||||
/// Returns all unsorted and un-scored lights (both global and local).
|
/// Returns all unsorted and un-scored lights (both global and local).
|
||||||
|
|
|
||||||
|
|
@ -422,7 +422,7 @@ void CubeReflector::updateFace( const ReflectParams ¶ms, U32 faceidx )
|
||||||
reflectRenderState.setDiffuseCameraTransform( params.query->headMatrix );
|
reflectRenderState.setDiffuseCameraTransform( params.query->headMatrix );
|
||||||
|
|
||||||
// render scene
|
// render scene
|
||||||
LIGHTMGR->registerGlobalLights( &reflectRenderState.getCullingFrustum(), false, false );
|
LIGHTMGR->registerGlobalLights( &reflectRenderState.getCullingFrustum(), false );
|
||||||
gClientSceneGraph->renderSceneNoLights( &reflectRenderState, mDesc->objectTypeMask );
|
gClientSceneGraph->renderSceneNoLights( &reflectRenderState, mDesc->objectTypeMask );
|
||||||
LIGHTMGR->unregisterAllLights();
|
LIGHTMGR->unregisterAllLights();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue