Updates ImageAsset usage to utilize AssetRef, and standardizes the setter/getter functions and naming conventions, as well as the ability to use and bind named targets.

This commit is contained in:
JeffR 2026-06-16 17:39:30 -05:00
parent a858d8624e
commit 34e3f78a22
82 changed files with 1451 additions and 951 deletions

View file

@ -188,6 +188,11 @@ void TSLastDetail::render( const TSRenderState &rdata, F32 alpha )
renderPass->addInst( ri );
}
StringTableEntry TSLastDetail::_getImposterAssetId( const String &filePath )
{
return ImageAsset::getAssetIdFromFilePath( StringTable->insert( filePath.c_str() ) );
}
void TSLastDetail::update( bool forceUpdate )
{
// This should never be called on a dedicated server or
@ -252,8 +257,8 @@ void TSLastDetail::update( bool forceUpdate )
// Setup the material for this imposter.
mMaterial = MATMGR->allocateAndRegister( String::EmptyString );
mMaterial->mAutoGenerated = true;
mMaterial->_setDiffuseMap(diffuseMapPath, 0);
mMaterial->_setNormalMap(_getNormalMapPath(), 0);
mMaterial->setDiffuseMap(_getImposterAssetId(diffuseMapPath), 0);
mMaterial->setNormalMap(_getImposterAssetId(_getNormalMapPath()), 0);
mMaterial->mImposterLimits.set( (mNumPolarSteps * 2) + 1, mNumEquatorSteps, mPolarAngle, mIncludePoles );
mMaterial->mTranslucent = true;