mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04:00
Fix for dark terrain in some cases
This commit is contained in:
parent
cdd0623009
commit
5666e02546
@ -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…
x
Reference in New Issue
Block a user