From 45d9e38616c55e408de78a24a7ae2f455c8f0cef Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 22 Apr 2017 14:27:45 +0200 Subject: [PATCH] Fix check for default material --- components/nifosg/nifloader.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index ff986c1f8..2e591619e 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -1773,8 +1773,10 @@ namespace NifOsg } if (!hasMatCtrl && mat->getColorMode() == osg::Material::OFF + && mat->getEmission(osg::Material::FRONT_AND_BACK) == osg::Vec4f(0,0,0,1) && mat->getDiffuse(osg::Material::FRONT_AND_BACK) == osg::Vec4f(1,1,1,1) && mat->getAmbient(osg::Material::FRONT_AND_BACK) == osg::Vec4f(1,1,1,1) + && mat->getShininess(osg::Material::FRONT_AND_BACK) == 0 && mat->getSpecular(osg::Material::FRONT_AND_BACK) == osg::Vec4f(0.f, 0.f, 0.f, 0.f)) { // default state, skip