Fix for dark terrain in some cases

c++11
scrawl 10 years ago
parent cdd0623009
commit 5666e02546

@ -28,6 +28,7 @@
#include <osg/Texture2D>
#include <osg/TexMat>
#include <osg/Material>
#include <osg/TexEnvCombine>
#include <osg/io_utils>
@ -67,6 +68,12 @@ namespace Terrain
stateset->setTextureAttributeAndModes(texunit, new osg::TexMat(texMat));
osg::ref_ptr<osg::TexEnvCombine> texEnvCombine (new osg::TexEnvCombine);
texEnvCombine->setCombine_RGB(osg::TexEnvCombine::REPLACE);
texEnvCombine->setSource0_RGB(osg::TexEnvCombine::PREVIOUS);
stateset->setTextureAttributeAndModes(texunit, texEnvCombine, osg::StateAttribute::ON);
++texunit;
}

Loading…
Cancel
Save