1
0
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:
Andrei Kortunov 2019-11-17 17:24:20 +04:00
parent 8dbbe42f21
commit f09d20434c

View File

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