Enabling visibility tests

This commit is contained in:
VXP 2016-09-07 02:12:05 +03:00
parent 27bc340b96
commit 37e2c8ef15
2 changed files with 14 additions and 0 deletions

View file

@ -2626,6 +2626,13 @@ void CClientShadowMgr::BuildFlashlight( ClientShadowHandle_t handle )
VPROF_BUDGET( "CClientShadowMgr::BuildFlashlight", VPROF_BUDGETGROUP_SHADOW_DEPTH_TEXTURING );
// Don't project the flashlight if the frustum AABB is not in our view
Vector mins, maxs;
CalculateAABBFromProjectionMatrix(shadow.m_WorldToShadow, &mins, &maxs);
if(engine->CullBox(mins, maxs))
return;
bool bLightModels = r_flashlightmodels.GetBool();
bool bLightSpecificEntity = shadow.m_hTargetEntity.Get() != NULL;
bool bLightWorld = ( shadow.m_Flags & SHADOW_FLAGS_LIGHT_WORLD ) != 0;

View file

@ -2623,6 +2623,13 @@ void CClientShadowMgr::BuildFlashlight( ClientShadowHandle_t handle )
VPROF_BUDGET( "CClientShadowMgr::BuildFlashlight", VPROF_BUDGETGROUP_SHADOW_DEPTH_TEXTURING );
// Don't project the flashlight if the frustum AABB is not in our view
Vector mins, maxs;
CalculateAABBFromProjectionMatrix(shadow.m_WorldToShadow, &mins, &maxs);
if(engine->CullBox(mins, maxs))
return;
bool bLightModels = r_flashlightmodels.GetBool();
bool bLightSpecificEntity = shadow.m_hTargetEntity.Get() != NULL;
bool bLightWorld = ( shadow.m_Flags & SHADOW_FLAGS_LIGHT_WORLD ) != 0;