From c7493eb45c41637b623737d0c23828daff629af5 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 11 Jun 2015 16:14:51 +0200 Subject: [PATCH] Fix bug with invisibility effect for meshes w/ vertex colors --- apps/openmw/mwrender/npcanimation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index 7de3e1d5a..21ec8d535 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -1006,7 +1006,7 @@ void NpcAnimation::setAlpha(float alpha) // FIXME: overriding diffuse/ambient/emissive colors osg::Material* material (new osg::Material); - material->setColorMode(osg::Material::DIFFUSE); + material->setColorMode(osg::Material::OFF); material->setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4f(1,1,1,alpha)); material->setAmbient(osg::Material::FRONT_AND_BACK, osg::Vec4f(1,1,1,1)); stateset->setAttributeAndModes(material, osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE);