mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 04:36:41 +00:00
Merge pull request #2601 from akortunov/warnfix
Clamp number of shadow maps
This commit is contained in:
commit
5f04c12ac3
1 changed files with 2 additions and 0 deletions
|
@ -24,6 +24,8 @@ namespace SceneUtil
|
|||
mShadowSettings->setReceivesShadowTraversalMask(~0u);
|
||||
|
||||
int numberOfShadowMapsPerLight = Settings::Manager::getInt("number of shadow maps", "Shadows");
|
||||
numberOfShadowMapsPerLight = std::max(1, std::min(numberOfShadowMapsPerLight, 8));
|
||||
|
||||
mShadowSettings->setNumShadowMapsPerLight(numberOfShadowMapsPerLight);
|
||||
mShadowSettings->setBaseShadowTextureUnit(8 - numberOfShadowMapsPerLight);
|
||||
|
||||
|
|
Loading…
Reference in a new issue