GlowTexture keeps the alpha channel from the previous texture stage

pull/638/head
scrawl 10 years ago
parent 2b53e5d965
commit 7a5f220ac5

@ -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)

Loading…
Cancel
Save