retweaked filter for wether ot not to supress the zonelight culling methods when not in the diffuse pass

This commit is contained in:
Azaezel 2018-12-05 10:55:29 -06:00
parent d86f8b16e8
commit 866ff49993
3 changed files with 4 additions and 4 deletions

View file

@ -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)
{ {

View file

@ -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).

View file

@ -422,7 +422,7 @@ void CubeReflector::updateFace( const ReflectParams &params, 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();