mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
cleanup areas checking for named tex target in materials
This commit is contained in:
parent
435462c738
commit
6eac6d767b
2 changed files with 2 additions and 2 deletions
|
|
@ -398,7 +398,7 @@ void ProcessedMaterial::_setStageData()
|
||||||
if (!mStages[i].getTex(MFT_DiffuseMap))
|
if (!mStages[i].getTex(MFT_DiffuseMap))
|
||||||
{
|
{
|
||||||
// If we start with a #, we're probably actually attempting to hit a named target and it may not get a hit on the first pass.
|
// If we start with a #, we're probably actually attempting to hit a named target and it may not get a hit on the first pass.
|
||||||
if (!String(mMaterial->getDiffuseMapAsset(i)->getImageFile()).startsWith("#") && !String(mMaterial->getDiffuseMapAsset(i)->getImageFile()).startsWith("$"))
|
if (!mMaterial->getDiffuseMapAsset(i)->isNamedTarget())
|
||||||
mMaterial->logError("Failed to load diffuse map %s for stage %i", mMaterial->getDiffuseMapAsset(i)->getImageFile(), i);
|
mMaterial->logError("Failed to load diffuse map %s for stage %i", mMaterial->getDiffuseMapAsset(i)->getImageFile(), i);
|
||||||
|
|
||||||
mStages[i].setTex(MFT_DiffuseMap, _createTexture(GFXTextureManager::getMissingTexturePath().c_str(), &GFXStaticTextureSRGBProfile));
|
mStages[i].setTex(MFT_DiffuseMap, _createTexture(GFXTextureManager::getMissingTexturePath().c_str(), &GFXStaticTextureSRGBProfile));
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ bool ProcessedShaderMaterial::init( const FeatureSet &features,
|
||||||
mInstancingState = new InstancingState();
|
mInstancingState = new InstancingState();
|
||||||
mInstancingState->setFormat( _getRPD( 0 )->shader->getInstancingFormat(), mVertexFormat );
|
mInstancingState->setFormat( _getRPD( 0 )->shader->getInstancingFormat(), mVertexFormat );
|
||||||
}
|
}
|
||||||
if (mMaterial && mMaterial->getDiffuseMapAsset(0).notNull() && String(mMaterial->getDiffuseMapAsset(0)->getImageFile()).startsWith("#"))
|
if (mMaterial && mMaterial->getDiffuseMapAsset(0).notNull() && mMaterial->getDiffuseMapAsset(0)->isNamedTarget())
|
||||||
{
|
{
|
||||||
NamedTexTarget *texTarget = mMaterial->getDiffuseMapAsset(0)->getNamedTarget();
|
NamedTexTarget *texTarget = mMaterial->getDiffuseMapAsset(0)->getNamedTarget();
|
||||||
RenderPassData* rpd = getPass(0);
|
RenderPassData* rpd = getPass(0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue