mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
further insurance that shadow split stay within bounds.
This commit is contained in:
parent
67e9119101
commit
6fa44a4e92
1 changed files with 6 additions and 3 deletions
|
|
@ -63,15 +63,15 @@ F32 PSSMLightShadowMap::smSmallestVisiblePixelSize = 25.0f;
|
|||
|
||||
PSSMLightShadowMap::PSSMLightShadowMap( LightInfo *light )
|
||||
: LightShadowMap( light ),
|
||||
mNumSplits( 0 )
|
||||
mNumSplits( 1 )
|
||||
{
|
||||
mIsViewDependent = true;
|
||||
}
|
||||
|
||||
void PSSMLightShadowMap::_setNumSplits( U32 numSplits, U32 texSize )
|
||||
{
|
||||
AssertFatal( numSplits > 0 && numSplits <= MAX_SPLITS,
|
||||
"PSSMLightShadowMap::_setNumSplits() - Splits must be between 1 and 4!" );
|
||||
AssertFatal(numSplits > 0 && numSplits <= MAX_SPLITS,
|
||||
avar("PSSMLightShadowMap::_setNumSplits() - Splits must be between 1 and %d!", MAX_SPLITS));
|
||||
|
||||
releaseTextures();
|
||||
|
||||
|
|
@ -387,6 +387,9 @@ void PSSMLightShadowMap::setShaderParameters(GFXShaderConstBuffer* params, Light
|
|||
{
|
||||
PROFILE_SCOPE( PSSMLightShadowMap_setShaderParameters );
|
||||
|
||||
AssertFatal(mNumSplits > 0 && mNumSplits <= MAX_SPLITS,
|
||||
avar("PSSMLightShadowMap::_setNumSplits() - Splits must be between 1 and %d!", MAX_SPLITS));
|
||||
|
||||
if ( lsc->mTapRotationTexSC->isValid() )
|
||||
GFX->setTexture( lsc->mTapRotationTexSC->getSamplerRegister(),
|
||||
SHADOWMGR->getTapRotationTex() );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue