mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 22:15:32 +00:00
GlowTexture keeps the alpha channel from the previous texture stage
This commit is contained in:
parent
2b53e5d965
commit
7a5f220ac5
1 changed files with 7 additions and 2 deletions
|
@ -1302,8 +1302,13 @@ namespace NifOsg
|
||||||
|
|
||||||
if (i == Nif::NiTexturingProperty::GlowTexture)
|
if (i == Nif::NiTexturingProperty::GlowTexture)
|
||||||
{
|
{
|
||||||
osg::TexEnv* texEnv = new osg::TexEnv;
|
osg::TexEnvCombine* texEnv = new osg::TexEnvCombine;
|
||||||
texEnv->setMode(osg::TexEnv::ADD);
|
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);
|
stateset->setTextureAttributeAndModes(texUnit, texEnv, osg::StateAttribute::ON);
|
||||||
}
|
}
|
||||||
else if (i == Nif::NiTexturingProperty::DarkTexture)
|
else if (i == Nif::NiTexturingProperty::DarkTexture)
|
||||||
|
|
Loading…
Reference in a new issue