forked from mirror/openmw-tes3mp
Fix needTangents not being set for cached/shared materials
This commit is contained in:
parent
546b0cee76
commit
bfdca3b738
1 changed files with 2 additions and 0 deletions
|
@ -277,6 +277,8 @@ Ogre::String NIFMaterialLoader::getMaterial(const Nif::ShapeData *shapedata,
|
||||||
if (itr != sMaterialMap.end())
|
if (itr != sMaterialMap.end())
|
||||||
{
|
{
|
||||||
// a suitable material exists already - use it
|
// a suitable material exists already - use it
|
||||||
|
sh::MaterialInstance* instance = sh::Factory::getInstance().getMaterialInstance(itr->second);
|
||||||
|
needTangents = !sh::retrieveValue<sh::StringValue>(instance->getProperty("normalMap"), instance).get().empty();
|
||||||
return itr->second;
|
return itr->second;
|
||||||
}
|
}
|
||||||
// not found, create a new one
|
// not found, create a new one
|
||||||
|
|
Loading…
Reference in a new issue