disable dynamic shadow if rain (because incompatible)
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5481 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 5e539d69ed47cb93bdddd52656b46a39af9d1a8d Former-commit-id: 386ae09558190daeb7663665e6b47ec2e040d48c
This commit is contained in:
parent
09ea392b46
commit
ca2c8ff716
1 changed files with 5 additions and 3 deletions
|
@ -440,10 +440,12 @@ void SDRender::ShadowedScene()
|
|||
{
|
||||
if (SHADOW_TECHNIQUE == 1)
|
||||
{
|
||||
unsigned int shadowTexUnit = 1;
|
||||
|
||||
osg::ref_ptr<osgShadow::ShadowMap> vdsm = new osgShadow::ShadowMap;
|
||||
vdsm->setLight(sunLight.get());
|
||||
vdsm->setTextureSize(osg::Vec2s(4096, 4096));
|
||||
vdsm->setTextureUnit(1);
|
||||
vdsm->setTextureUnit(shadowTexUnit);
|
||||
shadowRoot = new osgShadow::ShadowedScene;
|
||||
//osgShadow::ShadowSettings* settings = shadowRoot->getShadowSettings();
|
||||
shadowRoot->setReceivesShadowTraversalMask(rcvShadowMask);
|
||||
|
@ -481,7 +483,7 @@ void SDRender::ShadowedScene()
|
|||
new osgShadow::LightSpacePerspectiveShadowMapCB;
|
||||
|
||||
unsigned int baseTexUnit = 0;
|
||||
unsigned int shadowTexUnit = 1;
|
||||
unsigned int shadowTexUnit = 3;
|
||||
|
||||
lspsm->setMinLightMargin(10.0f);
|
||||
lspsm->setMaxFarPlane(1024.0f);
|
||||
|
@ -516,7 +518,7 @@ void SDRender::addCars(osg::Node* cars)
|
|||
optimizer.optimize(m_CarRoot.get());
|
||||
optimizer.optimize(m_scene.get());
|
||||
|
||||
if (SHADOW_TECHNIQUE > 0)
|
||||
if (SHADOW_TECHNIQUE > 0 & SDVisibility > 4000)
|
||||
ShadowedScene();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue