Attach shaders to geometry that lacks a stateset if necessary

This commit is contained in:
Alexei Dobrohotov 2023-02-28 18:50:30 +03:00
parent a9fdb51041
commit 6aef366fd3
3 changed files with 34 additions and 58 deletions

View file

@ -612,9 +612,6 @@ namespace MWRender
mRootNode->getOrCreateStateSet()->setAttributeAndModes(clipcontrol, osg::StateAttribute::ON);
}
// Assign a default shader on root to handle empty statesets
mResourceSystem->getSceneManager()->recreateShaders(mRootNode, "objects");
SceneUtil::setCameraClearDepth(mViewer->getCamera());
updateProjectionMatrix();