Operating System: windows
Render System: dx9
First of all, sorry for me spamming the forum: I have a lot of issues porting my code from 1.12 to 1.13...
My shadows are using LiSPSM, and it has been working for some years. With 1.13, I have black shadows everywhere.
I was doing this to init the shadows :
Code: Select all
camSetup = OGRE_NEW Ogre::LiSPSMShadowCameraSetup;
camSetup->setCameraLightDirectionThreshold(Ogre::Degree(5));
camSetup->setUseAggressiveFocusRegion(true);
camSetup->setOptimalAdjustFactor((Ogre::Real) 200);
mSceneMgr->setShadowFarDistance(270); //200 - bigger for 45 degrees
mSceneMgr->setShadowCameraSetup(Ogre::ShadowCameraSetupPtr(camSetup));
mSceneMgr->setShadowTechnique(Ogre::SHADOWTYPE_TEXTURE_MODULATIVE_INTEGRATED);
mSceneMgr->addListener(&shadowCameraUpdaterPlay);
Code: Select all
camSetup = OGRE_NEW Ogre::LiSPSMShadowCameraSetup;
camSetup->create(200, true, Ogre::Degree(5));
Then my listener:
Code: Select all
struct shadowListener: public Ogre::SceneManager::Listener
{
// this is a callback we'll be using to set up our shadow camera
void shadowTextureCasterPreViewProj(Ogre::Light *light, Ogre::Camera *cam, size_t)
{
float range = light->getAttenuationRange();
cam->setNearClipDistance(0.01);
cam->setFarClipDistance(range);
}
void shadowTexturesUpdated(size_t) {}
void shadowTextureReceiverPreViewProj(Ogre::Light*, Ogre::Frustum*) {}
void preFindVisibleObjects(Ogre::SceneManager*, Ogre::SceneManager::IlluminationRenderStage, Ogre::Viewport*) {}
void postFindVisibleObjects(Ogre::SceneManager*, Ogre::SceneManager::IlluminationRenderStage, Ogre::Viewport*) {}
} shadowCameraUpdaterPlay;