forked from mirror/openmw-tes3mp
Fix for dark terrain in some cases
This commit is contained in:
parent
cdd0623009
commit
5666e02546
1 changed files with 7 additions and 0 deletions
|
@ -28,6 +28,7 @@
|
||||||
#include <osg/Texture2D>
|
#include <osg/Texture2D>
|
||||||
#include <osg/TexMat>
|
#include <osg/TexMat>
|
||||||
#include <osg/Material>
|
#include <osg/Material>
|
||||||
|
#include <osg/TexEnvCombine>
|
||||||
|
|
||||||
#include <osg/io_utils>
|
#include <osg/io_utils>
|
||||||
|
|
||||||
|
@ -67,6 +68,12 @@ namespace Terrain
|
||||||
|
|
||||||
stateset->setTextureAttributeAndModes(texunit, new osg::TexMat(texMat));
|
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;
|
++texunit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue