|
|
|
@ -106,7 +106,7 @@ Ogre::String NIFMaterialLoader::getMaterial(const Nif::ShapeData *shapedata,
|
|
|
|
|
const Nif::NiZBufferProperty *zprop,
|
|
|
|
|
const Nif::NiSpecularProperty *specprop,
|
|
|
|
|
const Nif::NiWireframeProperty *wireprop,
|
|
|
|
|
bool &needTangents)
|
|
|
|
|
bool &needTangents, bool disableLighting)
|
|
|
|
|
{
|
|
|
|
|
Ogre::MaterialManager &matMgr = Ogre::MaterialManager::getSingleton();
|
|
|
|
|
Ogre::MaterialPtr material = matMgr.getByName(name);
|
|
|
|
@ -245,6 +245,14 @@ Ogre::String NIFMaterialLoader::getMaterial(const Nif::ShapeData *shapedata,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (disableLighting)
|
|
|
|
|
{
|
|
|
|
|
ambient = Ogre::Vector3(0.f);
|
|
|
|
|
diffuse = Ogre::Vector3(0.f);
|
|
|
|
|
specular = Ogre::Vector3(0.f);
|
|
|
|
|
emissive = Ogre::Vector3(1.f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
// Generate a hash out of all properties that can affect the material.
|
|
|
|
|
size_t h = 0;
|
|
|
|
|