mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +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 )
|
PSSMLightShadowMap::PSSMLightShadowMap( LightInfo *light )
|
||||||
: LightShadowMap( light ),
|
: LightShadowMap( light ),
|
||||||
mNumSplits( 0 )
|
mNumSplits( 1 )
|
||||||
{
|
{
|
||||||
mIsViewDependent = true;
|
mIsViewDependent = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PSSMLightShadowMap::_setNumSplits( U32 numSplits, U32 texSize )
|
void PSSMLightShadowMap::_setNumSplits( U32 numSplits, U32 texSize )
|
||||||
{
|
{
|
||||||
AssertFatal( numSplits > 0 && numSplits <= MAX_SPLITS,
|
AssertFatal(numSplits > 0 && numSplits <= MAX_SPLITS,
|
||||||
"PSSMLightShadowMap::_setNumSplits() - Splits must be between 1 and 4!" );
|
avar("PSSMLightShadowMap::_setNumSplits() - Splits must be between 1 and %d!", MAX_SPLITS));
|
||||||
|
|
||||||
releaseTextures();
|
releaseTextures();
|
||||||
|
|
||||||
|
|
@ -387,6 +387,9 @@ void PSSMLightShadowMap::setShaderParameters(GFXShaderConstBuffer* params, Light
|
||||||
{
|
{
|
||||||
PROFILE_SCOPE( PSSMLightShadowMap_setShaderParameters );
|
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() )
|
if ( lsc->mTapRotationTexSC->isValid() )
|
||||||
GFX->setTexture( lsc->mTapRotationTexSC->getSamplerRegister(),
|
GFX->setTexture( lsc->mTapRotationTexSC->getSamplerRegister(),
|
||||||
SHADOWMGR->getTapRotationTex() );
|
SHADOWMGR->getTapRotationTex() );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue