mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-10 14:14:33 +00:00
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:
parent
a858d8624e
commit
34e3f78a22
82 changed files with 1451 additions and 951 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue