|
|
|
@ -1319,6 +1319,7 @@ namespace MWRender
|
|
|
|
|
const float lodFactor = Settings::terrain().mLodFactor;
|
|
|
|
|
const bool groundcover = Settings::groundcover().mEnabled;
|
|
|
|
|
const bool distantTerrain = Settings::terrain().mDistantTerrain;
|
|
|
|
|
const double expiryDelay = Settings::cells().mCacheExpiryDelay;
|
|
|
|
|
if (distantTerrain || groundcover)
|
|
|
|
|
{
|
|
|
|
|
const int compMapResolution = Settings::terrain().mCompositeMapResolution;
|
|
|
|
@ -1329,7 +1330,7 @@ namespace MWRender
|
|
|
|
|
const bool debugChunks = Settings::terrain().mDebugChunks;
|
|
|
|
|
auto quadTreeWorld = std::make_unique<Terrain::QuadTreeWorld>(mSceneRoot, mRootNode, mResourceSystem,
|
|
|
|
|
mTerrainStorage.get(), Mask_Terrain, Mask_PreCompile, Mask_Debug, compMapResolution, compMapLevel,
|
|
|
|
|
lodFactor, vertexLodMod, maxCompGeometrySize, debugChunks, worldspace);
|
|
|
|
|
lodFactor, vertexLodMod, maxCompGeometrySize, debugChunks, worldspace, expiryDelay);
|
|
|
|
|
if (Settings::terrain().mObjectPaging)
|
|
|
|
|
{
|
|
|
|
|
newChunkMgr.mObjectPaging
|
|
|
|
@ -1351,7 +1352,7 @@ namespace MWRender
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
newChunkMgr.mTerrain = std::make_unique<Terrain::TerrainGrid>(mSceneRoot, mRootNode, mResourceSystem,
|
|
|
|
|
mTerrainStorage.get(), Mask_Terrain, worldspace, Mask_PreCompile, Mask_Debug);
|
|
|
|
|
mTerrainStorage.get(), Mask_Terrain, worldspace, expiryDelay, Mask_PreCompile, Mask_Debug);
|
|
|
|
|
|
|
|
|
|
newChunkMgr.mTerrain->setTargetFrameRate(Settings::cells().mTargetFramerate);
|
|
|
|
|
float distanceMult = std::cos(osg::DegreesToRadians(std::min(mFieldOfView, 140.f)) / 2.f);
|
|
|
|
|