diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-04 05:09:48 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-04 05:09:48 +1000 |
commit | ced1ba32bbabbac5f4c022434b02cb4afeff7c62 (patch) | |
tree | 8e10e44d6afdc6e82aaf4346c55bae371445e4a0 /source/rendering | |
parent | 3a353ece5fa45e66137d4202dd0bdd7e1cd12642 (diff) |
Fix terrain chunk meshes constantly being removed from the cache because the default time smear is the exact same as the timeout
Diffstat (limited to 'source/rendering')
-rw-r--r-- | source/rendering/StarTilePainter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/rendering/StarTilePainter.cpp b/source/rendering/StarTilePainter.cpp index 10edb00..d0a7e5a 100644 --- a/source/rendering/StarTilePainter.cpp +++ b/source/rendering/StarTilePainter.cpp @@ -17,7 +17,11 @@ TilePainter::TilePainter(RendererPtr renderer) { auto assets = root.assets(); m_terrainChunkCache.setTimeToLive(assets->json("/rendering.config:chunkCacheTimeout").toInt()); + m_terrainChunkCache.setTimeSmear(m_terrainChunkCache.timeToLive() / 4); + m_liquidChunkCache.setTimeToLive(assets->json("/rendering.config:chunkCacheTimeout").toInt()); + m_liquidChunkCache.setTimeSmear(m_liquidChunkCache.timeToLive() / 4); + m_textureCache.setTimeToLive(assets->json("/rendering.config:textureTimeout").toInt()); m_backgroundLayerColor = jsonToColor(assets->json("/rendering.config:backgroundLayerColor")).toRgba(); |