mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 19:53:48 +00:00
processed material null ref
processedMaterial was not checking to see if each asset was null before getting the image filename inside the call to _createCompositeTexture
This commit is contained in:
parent
c0d87cd3f1
commit
a52069bbc5
2 changed files with 6 additions and 4 deletions
|
|
@ -477,9 +477,11 @@ void ProcessedMaterial::_setStageData()
|
|||
inputKey[1] = mMaterial->mRoughnessChan[i];
|
||||
inputKey[2] = mMaterial->mMetalChan[i];
|
||||
inputKey[3] = 0;
|
||||
mStages[i].setTex(MFT_OrmMap, _createCompositeTexture( mMaterial->getAOMapAsset(i)->getImageFile(), mMaterial->getRoughMapAsset(i)->getImageFile(),
|
||||
mMaterial->getMetalMapAsset(i)->getImageFile(), "",
|
||||
inputKey, profile));
|
||||
mStages[i].setTex(MFT_OrmMap,
|
||||
_createCompositeTexture(mMaterial->getAOMapAsset(i).notNull() ? mMaterial->getAOMapAsset(i)->getImageFile() : "",
|
||||
mMaterial->getRoughMapAsset(i).notNull() ? mMaterial->getRoughMapAsset(i)->getImageFile() : "",
|
||||
mMaterial->getMetalMapAsset(i).notNull() ? mMaterial->getMetalMapAsset(i)->getImageFile() : "",
|
||||
"", inputKey, profile));
|
||||
if (!mStages[i].getTex(MFT_OrmMap))
|
||||
mMaterial->logError("Failed to dynamically create ORM Config map for stage %i", i);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue