Bladeren bron

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

Azaezel 6 jaren geleden
bovenliggende
commit
74ca8d106c

+ 2 - 2
Engine/source/lighting/lightManager.cpp

@@ -198,7 +198,7 @@ void LightManager::setSpecialLight( LightManager::SpecialLightTypesEnum type, Li
    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 );
 
@@ -226,7 +226,7 @@ void LightManager::registerGlobalLights( const Frustum *frustum, bool staticLigh
    {
       // Cull the lights using the frustum.
       getSceneManager()->getContainer()->findObjectList( *frustum, lightMask, &activeLights );
-	  if (cullSceneLights)
+	  if (enableZoneLightCulling)
 	  {
 		  for (U32 i = 0; i < activeLights.size(); ++i)
 		  {

+ 1 - 1
Engine/source/lighting/lightManager.h

@@ -134,7 +134,7 @@ public:
    virtual void registerLocalLight( 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();
 
    /// Returns all unsorted and un-scored lights (both global and local).

+ 1 - 1
Engine/source/scene/reflector.cpp

@@ -422,7 +422,7 @@ void CubeReflector::updateFace( const ReflectParams &params, U32 faceidx )
    reflectRenderState.setDiffuseCameraTransform( params.query->headMatrix );
 
    // render scene
-   LIGHTMGR->registerGlobalLights( &reflectRenderState.getCullingFrustum(), false, false );
+   LIGHTMGR->registerGlobalLights( &reflectRenderState.getCullingFrustum(), false );
    gClientSceneGraph->renderSceneNoLights( &reflectRenderState, mDesc->objectTypeMask );
    LIGHTMGR->unregisterAllLights();