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:
commit
37661bffea
1 changed files with 3 additions and 0 deletions
|
@ -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…
Reference in a new issue