1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

Fix for dark terrain in some cases

This commit is contained in:
scrawl 2015-06-03 02:21:41 +02:00
parent cdd0623009
commit 5666e02546

View File

@ -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;
}