exclude background & sky for shadow
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5512 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: b6b5101695467044a9075973805f4d74b376596e Former-commit-id: 1d8940d2852597698ee8ead1705115189a8bd764
This commit is contained in:
parent
9b3e8df428
commit
b32896d5cf
1 changed files with 11 additions and 3 deletions
|
@ -362,9 +362,16 @@ void SDRender::Init(tTrack *track)
|
|||
sceneGroup->addChild(precipitationEffect.get());
|
||||
}
|
||||
|
||||
m_scene->addChild(scenery->getScene());
|
||||
m_scene->addChild(scenery->getBackground());
|
||||
m_scene->setNodeMask(rcvShadowMask);
|
||||
osg::ref_ptr<osg::Group> scene = new osg::Group;
|
||||
osg::ref_ptr<osg::Group> background = new osg::Group;
|
||||
scene->addChild(scenery->getScene());
|
||||
background->addChild(scenery->getBackground());
|
||||
scene->setNodeMask( rcvShadowMask );
|
||||
background->setNodeMask(~(rcvShadowMask | castShadowMask));
|
||||
|
||||
m_scene->addChild(scene);
|
||||
m_scene->addChild(background);
|
||||
//m_scene->setNodeMask(rcvShadowMask);
|
||||
|
||||
sceneGroup->addChild(m_scene);
|
||||
sceneGroup->addChild(m_CarRoot.get());
|
||||
|
@ -418,6 +425,7 @@ void SDRender::Init(tTrack *track)
|
|||
skySS = skyGroup->getOrCreateStateSet();
|
||||
skySS->setMode(GL_LIGHT0, osg::StateAttribute::OFF);
|
||||
skyGroup->addChild(thesky->getPreRoot());
|
||||
skyGroup->setNodeMask(~(castShadowMask | rcvShadowMask));
|
||||
sunLight->addChild(skyGroup.get());
|
||||
mRoot->addChild(sceneGroup.get());
|
||||
mRoot->setStateSet(setFogState().get());
|
||||
|
|
Loading…
Reference in a new issue