diff --git a/src/modules/graphic/osggraph/OsgFX/OsgRender.cpp b/src/modules/graphic/osggraph/OsgFX/OsgRender.cpp index 9fe34b349..e9077f152 100755 --- a/src/modules/graphic/osggraph/OsgFX/OsgRender.cpp +++ b/src/modules/graphic/osggraph/OsgFX/OsgRender.cpp @@ -417,6 +417,7 @@ void SDRender::ShadowedScene() new osgShadow::LightSpacePerspectiveShadowMapCB; unsigned int baseTexUnit = 0; + unsigned int baseTexUnit2 = 1; unsigned int shadowTexUnit = 3; lspsm->setMinLightMargin(10.0f); @@ -424,7 +425,9 @@ void SDRender::ShadowedScene() lspsm->setTextureSize(osg::Vec2s(4096, 4096)); lspsm->setShadowTextureCoordIndex(shadowTexUnit); lspsm->setShadowTextureUnit(shadowTexUnit); + lspsm->setBaseTextureCoordIndex(baseTexUnit2); lspsm->setBaseTextureCoordIndex(baseTexUnit); + lspsm->setBaseTextureUnit(baseTexUnit); shadowRoot = new osgShadow::ShadowedScene; shadowRoot->setReceivesShadowTraversalMask(rcvShadowMask); diff --git a/src/modules/graphic/osggraph/OsgFX/OsgRender.h b/src/modules/graphic/osggraph/OsgFX/OsgRender.h index 70c58efa4..6ef99a4cf 100755 --- a/src/modules/graphic/osggraph/OsgFX/OsgRender.h +++ b/src/modules/graphic/osggraph/OsgFX/OsgRender.h @@ -26,7 +26,7 @@ #include //tTrack #include // tSituation -#define SHADOW_TECHNIQUE 0 +#define SHADOW_TECHNIQUE 4 class SDSky; class SDScenery;