From Giampaolo Vigano, "please find attached a further fix for 3ds plugin: now reflection map works also with transparent objects (I also removed a redundant setting of BlendFunc)."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14855 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
parent
5237185e8c
commit
2b1abf1937
@ -1365,8 +1365,6 @@ ReaderWriter3DS::StateSetInfo ReaderWriter3DS::ReaderObject::createStateSet(Lib3
|
||||
|
||||
stateset->setTextureAttributeAndModes(unit, texenv, osg::StateAttribute::ON);
|
||||
|
||||
osg::BlendFunc* blendfunc = new osg::BlendFunc(osg::BlendFunc::SRC_ALPHA,osg::BlendFunc::ONE_MINUS_SRC_ALPHA);
|
||||
stateset->setAttributeAndModes(blendfunc, osg::StateAttribute::ON);
|
||||
osg::TexEnv* tenv = new osg::TexEnv();
|
||||
tenv->setMode(osg::TexEnv::MODULATE);
|
||||
stateset->setTextureAttributeAndModes(unit, tenv, osg::StateAttribute::ON);
|
||||
@ -1392,7 +1390,11 @@ ReaderWriter3DS::StateSetInfo ReaderWriter3DS::ReaderObject::createStateSet(Lib3
|
||||
texenv->setSource0_RGB(osg::TexEnvCombine::TEXTURE);
|
||||
texenv->setSource1_RGB(osg::TexEnvCombine::PREVIOUS);
|
||||
texenv->setSource2_RGB(osg::TexEnvCombine::CONSTANT);
|
||||
texenv->setConstantColor(osg::Vec4(factor, factor, factor, factor));
|
||||
texenv->setCombine_Alpha(osg::TexEnvCombine::REPLACE);
|
||||
texenv->setSource0_Alpha(osg::TexEnvCombine::CONSTANT);
|
||||
texenv->setOperand0_Alpha(osg::TexEnvCombine::SRC_ALPHA);
|
||||
texenv->setConstantColor(osg::Vec4(factor, factor, factor, alpha));
|
||||
|
||||
stateset->setTextureAttributeAndModes(unit, texenv.get(), osg::StateAttribute::ON);
|
||||
unit++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user