mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
adjusted fog distance, prevents objects suddenly popping up on cell load
This commit is contained in:
parent
cbbc295eb6
commit
e8267c7363
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user