mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +00:00
Clamp number of shadow maps
This commit is contained in:
parent
8dbbe42f21
commit
f09d20434c
@ -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 New Issue
Block a user