mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-19 06:33:49 +00:00
Adds test shapes of Kork and SpaceOrc
Sidestep of memleak from CSF at the moment Minor fixes and corrections with asset importing and loose files WIP of updated options menu
This commit is contained in:
parent
6eb997c449
commit
6073bc5551
41 changed files with 804 additions and 193 deletions
|
|
@ -116,6 +116,7 @@ Material::Material()
|
|||
{
|
||||
mDiffuse[i].set( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
mDiffuseMapSRGB[i] = true;
|
||||
mDiffuseMapAsset[i] = StringTable->EmptyString();
|
||||
|
||||
mSmoothness[i] = 0.0f;
|
||||
mMetalness[i] = 0.0f;
|
||||
|
|
@ -172,8 +173,10 @@ Material::Material()
|
|||
// Deferred Shading
|
||||
mMatInfoFlags[i] = 0.0f;
|
||||
mRoughMapFilename[i].clear();
|
||||
mRoughMapAsset[i] = StringTable->EmptyString();
|
||||
mAOMapFilename[i].clear();
|
||||
mMetalMapFilename[i].clear();
|
||||
mMetalMapAsset[i] = StringTable->EmptyString();
|
||||
}
|
||||
|
||||
dMemset(mCellIndex, 0, sizeof(mCellIndex));
|
||||
|
|
@ -235,6 +238,9 @@ void Material::initPersistFields()
|
|||
addField("diffuseMap", TypeImageFilename, Offset(mDiffuseMapFilename, Material), MAX_STAGES,
|
||||
"The diffuse color texture map." );
|
||||
|
||||
addField("diffuseMapAsset", TypeImageAssetPtr, Offset(mDiffuseMapAsset, Material), MAX_STAGES,
|
||||
"The diffuse color texture map." );
|
||||
|
||||
addField("diffuseMapSRGB", TypeBool, Offset(mDiffuseMapSRGB, Material), MAX_STAGES,
|
||||
"Enable sRGB for the diffuse color texture map.");
|
||||
|
||||
|
|
@ -636,7 +642,7 @@ void Material::_mapMaterial()
|
|||
// If mapTo not defined in script, try to use the base texture name instead
|
||||
if( mMapTo.isEmpty() )
|
||||
{
|
||||
if ( mDiffuseMapFilename[0].isEmpty() )
|
||||
if ( mDiffuseMapFilename[0].isEmpty() && mDiffuseMapAsset->isNull())
|
||||
return;
|
||||
|
||||
else
|
||||
|
|
@ -652,6 +658,10 @@ void Material::_mapMaterial()
|
|||
// use everything after the last slash
|
||||
mMapTo = mDiffuseMapFilename[0].substr(slashPos+1, mDiffuseMapFilename[0].length() - slashPos - 1);
|
||||
}
|
||||
else if (!mDiffuseMapAsset->isNull())
|
||||
{
|
||||
mMapTo = mDiffuseMapAsset[0]->getImageFileName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue