mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-19 15:39:49 +00:00
Default shader at root
Assign a default shader to the scene root, otherwise objects without an assigned shader will use the FFP. An example of this is a trishape with no material, resulting in an empty stateset on the drawable level.
This commit is contained in:
parent
2aac6abb85
commit
924ba11826
1 changed files with 3 additions and 0 deletions
|
@ -612,6 +612,9 @@ 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();
|
||||
|
|
Loading…
Reference in a new issue