1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 09:45:36 +00:00

Merge branch 'shadowdisable-fix' into 'master'

Make disableShadowsForStateSet a no-op when shadows are disabled

See merge request OpenMW/openmw!205
This commit is contained in:
AnyOldName3 2020-11-18 18:56:36 +00:00
commit 37661bffea

View file

@ -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));