monah
11-11-2010 09:51:38
Shadows tune like this:
by adding a tree in TreeLoader do so:
but it does not give any result as the shadows were true. Who knows how to disable shadow PagedGeometry?
Ogre:: TerrainMaterialGeneratorA:: SM2Profile * matProfile =
static_cast <Ogre::TerrainMaterialGeneratorA::SM2Profile*> (mTerrainOpt-> getDefaultMaterialGenerator () -> getActiveProfile ());
matProfile-> setReceiveDynamicShadowsEnabled (true);
matProfile-> setReceiveDynamicShadowsLowLod (false);
mSceneMgr-> setShadowTechnique (Ogre:: SHADOWTYPE_TEXTURE_ADDITIVE_INTEGRATED);
mSceneMgr-> setShadowFarDistance (200);
mSceneMgr-> setShadowTextureCountPerLightType (Ogre:: Light:: LT_DIRECTIONAL, 3);
Ogre:: PSSMShadowCameraSetup * pssmSetup = new Ogre:: PSSMShadowCameraSetup ();
pssmSetup-> setSplitPadding (mSceneMgr-> getCamera ("MainCamera") -> getNearClipDistance ());
pssmSetup-> calculateSplitPoints (3, mSceneMgr-> getCamera ("MainCamera") -> getNearClipDistance (), mSceneMgr-> getShadowFarDistance ());
pssmSetup-> setOptimalAdjustFactor (0, 2);
pssmSetup-> setOptimalAdjustFactor (1, 1);
pssmSetup-> setOptimalAdjustFactor (2, 0.5);
mPSSMSetup.bind (pssmSetup);
mSceneMgr-> setShadowCameraSetup (mPSSMSetup);
mSceneMgr-> setShadowTextureCount (3);
mSceneMgr-> setShadowTextureConfig (0, 1024, 1024, Ogre:: PF_X8B8G8R8);
mSceneMgr-> setShadowTextureConfig (1, 512, 512, Ogre:: PF_X8B8G8R8);
mSceneMgr-> setShadowTextureConfig (2, 512, 512, Ogre:: PF_X8B8G8R8);
mSceneMgr-> setShadowTextureSelfShadow (false);
mSceneMgr-> setShadowCasterRenderBackFaces (false);
mSceneMgr-> setShadowTextureCasterMaterial (Ogre:: StringUtil:: BLANK);
matProfile-> setReceiveDynamicShadowsDepth (false);
matProfile-> setReceiveDynamicShadowsPSSM (static_cast <Ogre::PSSMShadowCameraSetup*> (mPSSMSetup.get ()));
by adding a tree in TreeLoader do so:
Ogre:: Entity * ent = mSceneMgr-> createEntity ("Tree" Ogre:: StringConverter:: toString (num), name);
ent-> setCastShadows (false);
but it does not give any result as the shadows were true. Who knows how to disable shadow PagedGeometry?