1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 08:53:52 +00:00

adjusted fog distance, prevents objects suddenly popping up on cell load

This commit is contained in:
scrawl 2012-03-13 22:14:35 +01:00
parent cbbc295eb6
commit e8267c7363

View file

@ -210,9 +210,14 @@ void RenderingManager::configureFog(ESMS::CellStore<MWWorld::RefData> &mCell)
void RenderingManager::configureFog(const float density, const Ogre::ColourValue& colour) void RenderingManager::configureFog(const float density, const Ogre::ColourValue& colour)
{ {
/// \todo make the viewing distance and fog start/end configurable /// \todo make the viewing distance and fog start/end configurable
float low = 3000 / density;
float high = 6200 / density; // right now we load 3x3 cells, so the maximum viewing distance we
// can allow (to prevent objects suddenly popping up) equals:
// 8192 * 0.69
// ^ cell size ^ minimum density value used (clear weather)
float low = 5652.48 / density / 2.f;
float high = 5652.48 / density;
mRendering.getScene()->setFog (FOG_LINEAR, colour, 0, low, high); mRendering.getScene()->setFog (FOG_LINEAR, colour, 0, low, high);
mRendering.getCamera()->setFarClipDistance ( high ); mRendering.getCamera()->setFarClipDistance ( high );