mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 23:21:20 -04:00
Clamp number of shadow maps, as described in docs
This commit is contained in:
parent
5c6ca82c45
commit
7074baa1c2
@ -66,6 +66,8 @@ namespace SceneUtil
|
|||||||
void ShadowManager::disableShadowsForStateSet(osg::ref_ptr<osg::StateSet> stateset)
|
void ShadowManager::disableShadowsForStateSet(osg::ref_ptr<osg::StateSet> stateset)
|
||||||
{
|
{
|
||||||
int numberOfShadowMapsPerLight = Settings::Manager::getInt("number of shadow maps", "Shadows");
|
int numberOfShadowMapsPerLight = Settings::Manager::getInt("number of shadow maps", "Shadows");
|
||||||
|
numberOfShadowMapsPerLight = std::max(1, std::min(numberOfShadowMapsPerLight, 8));
|
||||||
|
|
||||||
int baseShadowTextureUnit = 8 - numberOfShadowMapsPerLight;
|
int baseShadowTextureUnit = 8 - numberOfShadowMapsPerLight;
|
||||||
|
|
||||||
osg::ref_ptr<osg::Image> fakeShadowMapImage = new osg::Image();
|
osg::ref_ptr<osg::Image> fakeShadowMapImage = new osg::Image();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user