Add object shadows setting

pull/541/head
AnyOldName3 7 years ago
parent d4b37ad6b1
commit e46bf28e5f

@ -207,8 +207,12 @@ namespace MWRender
shadowCastingTraversalMask |= Mask_Player;
if (Settings::Manager::getBool("terrain shadows", "Shadows"))
shadowCastingTraversalMask |= Mask_Terrain;
int indoorShadowCastingTraversalMask = shadowCastingTraversalMask;
if (Settings::Manager::getBool("object shadows", "Shadows"))
shadowCastingTraversalMask |= Mask_Object;
mShadowManager.reset(new SceneUtil::ShadowManager(sceneRoot, mRootNode, Mask_Object | shadowCastingTraversalMask, shadowCastingTraversalMask));
mShadowManager.reset(new SceneUtil::ShadowManager(sceneRoot, mRootNode, shadowCastingTraversalMask, indoorShadowCastingTraversalMask));
Shader::ShaderManager::DefineMap shadowDefines = mShadowManager->getShadowDefines();
Shader::ShaderManager::DefineMap globalDefines = mResourceSystem->getSceneManager()->getShaderManager().getGlobalDefines();

@ -496,4 +496,5 @@ actor shadows = false
player shadows = false
# Allow terrain to cast shadows. Potentially decreases performance.
terrain shadows = false
# Note: Right now, there is no setting allowing toggling of shadows for statics
# Allow world objects to cast shadows. Potentially decreases performance.
object shadows = false

Loading…
Cancel
Save