mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-04-20 16:32:30 +03:00
Implemented a fix from VDC so that projected textures can be parented in the movement hierarchy and increased the maximum number of projected textures from 1 to 8
This commit is contained in:
parent
8330254613
commit
a5ca814985
@ -221,15 +221,24 @@ void C_EnvProjectedTexture::UpdateLight( bool bForceUpdate )
|
||||
|
||||
g_pClientShadowMgr->SetFlashlightLightWorld( m_LightHandle, m_bLightWorld );
|
||||
|
||||
if ( bForceUpdate == false )
|
||||
{
|
||||
|
||||
// The conditional to check if bForceUpdate == false is commented out based on a guide on VDC
|
||||
// https://developer.valvesoftware.com/wiki/Env_projectedtexture/fixes
|
||||
// This was done so that projected textures may be parented.
|
||||
// Change made by Derek Dik on 9/4/2016
|
||||
|
||||
//if ( bForceUpdate == false )
|
||||
//{
|
||||
g_pClientShadowMgr->UpdateProjectedTexture( m_LightHandle, true );
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
void C_EnvProjectedTexture::Simulate( void )
|
||||
{
|
||||
UpdateLight( false );
|
||||
// According to VDC, we want to update the light based on when there is a movement parent
|
||||
//https://developer.valvesoftware.com/wiki/Env_projectedtexture/fixes
|
||||
// Change made by Derek Dik on 9/4/2016
|
||||
UpdateLight( GetMoveParent() != NULL );
|
||||
|
||||
BaseClass::Simulate();
|
||||
}
|
||||
|
@ -1290,9 +1290,13 @@ bool CClientShadowMgr::Init()
|
||||
|
||||
SetShadowBlobbyCutoffArea( 0.005 );
|
||||
|
||||
bool bTools = CommandLine()->CheckParm( "-tools" ) != NULL;
|
||||
m_nMaxDepthTextureShadows = bTools ? 4 : 1; // Just one shadow depth texture in games, more in tools
|
||||
|
||||
// Raise the max projected texture limit to 8
|
||||
// https://developer.valvesoftware.com/wiki/Env_projectedtexture/fixes
|
||||
//bool bTools = CommandLine()->CheckParm( "-tools" ) != NULL;
|
||||
//m_nMaxDepthTextureShadows = bTools ? 4 : 1; // Just one shadow depth texture in games, more in tools
|
||||
m_nMaxDepthTextureShadows = 8; //with your number
|
||||
|
||||
|
||||
bool bLowEnd = ( g_pMaterialSystemHardwareConfig->GetDXSupportLevel() < 80 );
|
||||
|
||||
if ( !bLowEnd && r_shadowrendertotexture.GetBool() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user