|
|
|
@ -210,9 +210,14 @@ void RenderingManager::configureFog(ESMS::CellStore<MWWorld::RefData> &mCell)
|
|
|
|
|
void RenderingManager::configureFog(const float density, const Ogre::ColourValue& colour)
|
|
|
|
|
{
|
|
|
|
|
/// \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.getCamera()->setFarClipDistance ( high );
|
|
|
|
|