material definition finished

This commit is contained in:
marauder2k7 2024-12-27 14:38:01 +00:00
parent 58119a4f82
commit 0f4d2d1689
5 changed files with 28 additions and 43 deletions

View file

@ -194,20 +194,20 @@ void AssimpAppMaterial::initMaterial(const Torque::Path& path, Material* mat) co
{ // If we have either map, fill all three slots
if (rmName.isNotEmpty())
{
mat->mRoughMapName[0] = cleanTextureName(rmName, cleanFile, path, false); // Roughness
mat->_setRoughMap(cleanTextureName(rmName, cleanFile, path, false), 0); // Roughness
mat->mRoughnessChan[0] = 1.0f;
mat->mInvertRoughness[0] = (floatVal == 1.0f);
mat->mMetalMapName[0] = cleanTextureName(rmName, cleanFile, path, false); // Metallic
mat->_setMetalMap(cleanTextureName(rmName, cleanFile, path, false), 0); // Metallic
mat->mMetalChan[0] = 2.0f;
}
if (aoName.isNotEmpty())
{
mat->mAOMapName[0] = cleanTextureName(aoName, cleanFile, path, false); // occlusion
mat->_setAOMap(cleanTextureName(aoName, cleanFile, path, false), 0); // occlusion
mat->mAOChan[0] = 0.0f;
}
else
{
mat->mAOMapName[0] = cleanTextureName(rmName, cleanFile, path, false); // occlusion
mat->_setAOMap(cleanTextureName(aoName, cleanFile, path, false), 0); // occlusion
mat->mAOChan[0] = 0.0f;
}
}