mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 08:15:34 +00:00
Don't re-enable specularity w/ material controller for MW models
This commit is contained in:
parent
0a73771f17
commit
956edca524
1 changed files with 4 additions and 1 deletions
|
@ -845,8 +845,10 @@ namespace NifOsg
|
|||
const Nif::NiMaterialColorController* matctrl = static_cast<const Nif::NiMaterialColorController*>(ctrl.getPtr());
|
||||
if (matctrl->data.empty() && matctrl->interpolator.empty())
|
||||
continue;
|
||||
osg::ref_ptr<MaterialColorController> osgctrl;
|
||||
auto targetColor = static_cast<MaterialColorController::TargetColor>(matctrl->targetColor);
|
||||
if (mVersion <= Nif::NIFFile::NIFVersion::VER_MW && targetColor == MaterialColorController::TargetColor::Specular)
|
||||
continue;
|
||||
osg::ref_ptr<MaterialColorController> osgctrl;
|
||||
if (!matctrl->interpolator.empty())
|
||||
osgctrl = new MaterialColorController(matctrl->interpolator.getPtr(), targetColor, baseMaterial);
|
||||
else // if (!matctrl->data.empty())
|
||||
|
@ -1967,6 +1969,7 @@ namespace NifOsg
|
|||
case Nif::RC_NiSpecularProperty:
|
||||
{
|
||||
// Specular property can turn specular lighting off.
|
||||
// FIXME: NiMaterialColorController doesn't care about this.
|
||||
auto specprop = static_cast<const Nif::NiSpecularProperty*>(property);
|
||||
specEnabled = specprop->flags & 1;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue