diff --git a/components/terrain/material.cpp b/components/terrain/material.cpp index 17acd940b9..ddfa10f129 100644 --- a/components/terrain/material.cpp +++ b/components/terrain/material.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include @@ -67,6 +68,12 @@ namespace Terrain stateset->setTextureAttributeAndModes(texunit, new osg::TexMat(texMat)); + osg::ref_ptr texEnvCombine (new osg::TexEnvCombine); + texEnvCombine->setCombine_RGB(osg::TexEnvCombine::REPLACE); + texEnvCombine->setSource0_RGB(osg::TexEnvCombine::PREVIOUS); + + stateset->setTextureAttributeAndModes(texunit, texEnvCombine, osg::StateAttribute::ON); + ++texunit; }