mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-08 11:01:33 +00:00
Enabling visibility tests
This commit is contained in:
parent
27bc340b96
commit
37e2c8ef15
2 changed files with 14 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue