mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
more gfx shadowvar cleanups
This commit is contained in:
parent
aad3578d1c
commit
33ebe34440
4 changed files with 9 additions and 9 deletions
|
|
@ -350,7 +350,7 @@ void DeferredBumpFeatGLSL::processPix( Vector<ShaderComponent*> &componentList,
|
||||||
|
|
||||||
if (fd.features.hasFeature(MFT_DetailNormalMap))
|
if (fd.features.hasFeature(MFT_DetailNormalMap))
|
||||||
{
|
{
|
||||||
Var *bumpMap = (Var*)LangElement::find("detailBumpMap");
|
bumpMap = (Var*)LangElement::find("detailBumpMap");
|
||||||
if (!bumpMap) {
|
if (!bumpMap) {
|
||||||
bumpMap = new Var;
|
bumpMap = new Var;
|
||||||
bumpMap->setType("sampler2D");
|
bumpMap->setType("sampler2D");
|
||||||
|
|
|
||||||
|
|
@ -367,7 +367,7 @@ void DeferredBumpFeatHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
||||||
|
|
||||||
if ( fd.features.hasFeature( MFT_DetailNormalMap ) )
|
if ( fd.features.hasFeature( MFT_DetailNormalMap ) )
|
||||||
{
|
{
|
||||||
Var *bumpMap = (Var*)LangElement::find( "detailBumpMap" );
|
bumpMap = (Var*)LangElement::find( "detailBumpMap" );
|
||||||
if ( !bumpMap )
|
if ( !bumpMap )
|
||||||
{
|
{
|
||||||
bumpMap = new Var;
|
bumpMap = new Var;
|
||||||
|
|
@ -378,7 +378,7 @@ void DeferredBumpFeatHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
||||||
bumpMap->constNum = Var::getTexUnitNum();
|
bumpMap->constNum = Var::getTexUnitNum();
|
||||||
}
|
}
|
||||||
|
|
||||||
Var* bumpMapTex = (Var*)LangElement::find("detailBumpMap");
|
bumpMapTex = (Var*)LangElement::find("detailBumpMap");
|
||||||
if (!bumpMapTex)
|
if (!bumpMapTex)
|
||||||
{
|
{
|
||||||
bumpMap->setType("SamplerState");
|
bumpMap->setType("SamplerState");
|
||||||
|
|
|
||||||
|
|
@ -254,7 +254,7 @@ void PSSMLightShadowMap::_render( RenderPassManager* renderPass,
|
||||||
|
|
||||||
for (U32 i = 0; i < mNumSplits; i++)
|
for (U32 i = 0; i < mNumSplits; i++)
|
||||||
{
|
{
|
||||||
GFXTransformSaver saver;
|
GFXTransformSaver splitSaver;
|
||||||
|
|
||||||
// Calculate a sub-frustum
|
// Calculate a sub-frustum
|
||||||
Frustum subFrustum(fullFrustum);
|
Frustum subFrustum(fullFrustum);
|
||||||
|
|
|
||||||
|
|
@ -531,9 +531,9 @@ bool ProcessedShaderMaterial::_createPasses( MaterialFeatureData &stageFeatures,
|
||||||
ShaderRenderPassData passData;
|
ShaderRenderPassData passData;
|
||||||
U32 texIndex = 0;
|
U32 texIndex = 0;
|
||||||
|
|
||||||
for( U32 i=0; i < FEATUREMGR->getFeatureCount(); i++ )
|
for( U32 featureIDx=0; featureIDx < FEATUREMGR->getFeatureCount(); featureIDx++ )
|
||||||
{
|
{
|
||||||
const FeatureInfo &info = FEATUREMGR->getAt( i );
|
const FeatureInfo &info = FEATUREMGR->getAt(featureIDx);
|
||||||
if ( !stageFeatures.features.hasFeature( *info.type ) )
|
if ( !stageFeatures.features.hasFeature( *info.type ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
@ -562,7 +562,7 @@ bool ProcessedShaderMaterial::_createPasses( MaterialFeatureData &stageFeatures,
|
||||||
#if defined(TORQUE_DEBUG) && defined( TORQUE_OPENGL)
|
#if defined(TORQUE_DEBUG) && defined( TORQUE_OPENGL)
|
||||||
if(oldTexNumber != texIndex)
|
if(oldTexNumber != texIndex)
|
||||||
{
|
{
|
||||||
for(int i = oldTexNumber; i < texIndex; i++)
|
for(int texNum = oldTexNumber; texNum < texIndex; texNum++)
|
||||||
{
|
{
|
||||||
AssertFatal(passData.mSamplerNames[ oldTexNumber ].isNotEmpty(), avar( "ERROR: ShaderGen feature %s don't set used sampler name", info.feature->getName().c_str()) );
|
AssertFatal(passData.mSamplerNames[ oldTexNumber ].isNotEmpty(), avar( "ERROR: ShaderGen feature %s don't set used sampler name", info.feature->getName().c_str()) );
|
||||||
}
|
}
|
||||||
|
|
@ -579,9 +579,9 @@ bool ProcessedShaderMaterial::_createPasses( MaterialFeatureData &stageFeatures,
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(TORQUE_DEBUG) && defined( TORQUE_OPENGL)
|
#if defined(TORQUE_DEBUG) && defined( TORQUE_OPENGL)
|
||||||
for(int i = 0; i < texIndex; i++)
|
for(int samplerIDx = 0; samplerIDx < texIndex; samplerIDx++)
|
||||||
{
|
{
|
||||||
AssertFatal(passData.mSamplerNames[ i ].isNotEmpty(),"");
|
AssertFatal(passData.mSamplerNames[samplerIDx].isNotEmpty(),"");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue