mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:53:52 +00:00
Make disableShadowsForStateSet a no-op when shadows are disabled
Otherwise the GPU has to do useless shadow comparisons when shadows are disabled.
This commit is contained in:
parent
8d01897942
commit
f14db21745
1 changed files with 3 additions and 0 deletions
|
@ -69,6 +69,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