1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-29 21:45:32 +00:00

GlowTexture keeps the alpha channel from the previous texture stage

This commit is contained in:
scrawl 2015-06-19 17:43:13 +02:00
parent 2b53e5d965
commit 7a5f220ac5

View file

@ -1302,8 +1302,13 @@ namespace NifOsg
if (i == Nif::NiTexturingProperty::GlowTexture)
{
osg::TexEnv* texEnv = new osg::TexEnv;
texEnv->setMode(osg::TexEnv::ADD);
osg::TexEnvCombine* texEnv = new osg::TexEnvCombine;
texEnv->setCombine_Alpha(osg::TexEnvCombine::REPLACE);
texEnv->setSource0_Alpha(osg::TexEnvCombine::PREVIOUS);
texEnv->setCombine_RGB(osg::TexEnvCombine::ADD);
texEnv->setSource0_RGB(osg::TexEnvCombine::PREVIOUS);
texEnv->setSource1_RGB(osg::TexEnvCombine::TEXTURE);
stateset->setTextureAttributeAndModes(texUnit, texEnv, osg::StateAttribute::ON);
}
else if (i == Nif::NiTexturingProperty::DarkTexture)