1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-05 22:45:32 +00:00

Make disabling shadows disable their performance impact, too.

This commit is contained in:
AnyOldName3 2017-12-26 23:51:50 +00:00
parent 4de3a361fb
commit c192c851db
2 changed files with 7 additions and 1 deletions

View file

@ -321,6 +321,12 @@ namespace SceneUtil
void MWShadow::cull(osgUtil::CullVisitor& cv) void MWShadow::cull(osgUtil::CullVisitor& cv)
{ {
if (!enableShadows)
{
_shadowedScene->osg::Group::traverse(cv);
return;
}
OSG_INFO << std::endl << std::endl << "ViewDependentShadowMap::cull(osg::CullVisitor&" << &cv << ")" << std::endl; OSG_INFO << std::endl << std::endl << "ViewDependentShadowMap::cull(osg::CullVisitor&" << &cv << ")" << std::endl;
if (!_shadowCastingStateSet) if (!_shadowCastingStateSet)

View file

@ -11,7 +11,7 @@ namespace SceneUtil
{ {
public: public:
static const int numberOfShadowMapsPerLight = 3; static const int numberOfShadowMapsPerLight = 3;
static const int enableShadows = true; static const bool enableShadows = true;
static const bool debugHud = true; static const bool debugHud = true;
MWShadow(); MWShadow();