1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-04-01 12:36:42 +00:00

Ignore the alpha value for particle materials (Bug #2699)

This commit is contained in:
scrawl 2015-06-17 17:55:15 +02:00
parent b648722d3b
commit 934166a853

View file

@ -866,8 +866,8 @@ namespace NifOsg
osg::Material* mat = static_cast<osg::Material*>(parentNode->getStateSet()->getAttribute(osg::StateAttribute::MATERIAL)); osg::Material* mat = static_cast<osg::Material*>(parentNode->getStateSet()->getAttribute(osg::StateAttribute::MATERIAL));
if (mat) if (mat)
{ {
osg::Vec4f diffuse = mat->getDiffuse(osg::Material::FRONT_AND_BACK); // NB ignoring diffuse.a()
mat->setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4f(0,0,0,diffuse.a())); mat->setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4f(0,0,0,1));
mat->setColorMode(osg::Material::AMBIENT); mat->setColorMode(osg::Material::AMBIENT);
} }