Merge branch 'shadowdisable-fix' into 'master'

Make disableShadowsForStateSet a no-op when shadows are disabled

See merge request OpenMW/openmw!205
pull/593/head
AnyOldName3 4 years ago
commit 37661bffea

@ -72,6 +72,9 @@ namespace SceneUtil
void ShadowManager::disableShadowsForStateSet(osg::ref_ptr<osg::StateSet> stateset)
{
if (!Settings::Manager::getBool("enable shadows", "Shadows"))
return;
int numberOfShadowMapsPerLight = Settings::Manager::getInt("number of shadow maps", "Shadows");
numberOfShadowMapsPerLight = std::max(1, std::min(numberOfShadowMapsPerLight, 8));

Loading…
Cancel
Save