From 3e792af3e56dd978aa75effbdd35d7436225f687 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 3 Feb 2026 13:37:52 -0800 Subject: [PATCH] Reduce render distances for better performance - Terrain load radius: 2 tiles (was 6) - 25 tiles max vs 169 - WMO render distance: 500 units (was 3000) - M2 doodad distance: 300 units (was 1000) --- include/rendering/terrain_manager.hpp | 4 ++-- src/rendering/m2_renderer.cpp | 2 +- src/rendering/wmo_renderer.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/rendering/terrain_manager.hpp b/include/rendering/terrain_manager.hpp index c48bf4ce..9254ba77 100644 --- a/include/rendering/terrain_manager.hpp +++ b/include/rendering/terrain_manager.hpp @@ -240,8 +240,8 @@ private: // Streaming parameters bool streamingEnabled = true; - int loadRadius = 6; // Load tiles within this radius (13x13 grid, ~3200 units) - int unloadRadius = 8; // Unload tiles beyond this radius (~4266 units) + int loadRadius = 2; // Load tiles within this radius (5x5 grid for performance) + int unloadRadius = 3; // Unload tiles beyond this radius float updateInterval = 0.1f; // Check streaming every 0.1 seconds float timeSinceLastUpdate = 0.0f; diff --git a/src/rendering/m2_renderer.cpp b/src/rendering/m2_renderer.cpp index b619ef3e..f9b74842 100644 --- a/src/rendering/m2_renderer.cpp +++ b/src/rendering/m2_renderer.cpp @@ -364,7 +364,7 @@ void M2Renderer::render(const Camera& camera, const glm::mat4& view, const glm:: lastDrawCallCount = 0; // Distance-based culling threshold for M2 models - const float maxRenderDistance = 1000.0f; // Don't render small doodads beyond this + const float maxRenderDistance = 300.0f; // Reduced for performance const float maxRenderDistanceSq = maxRenderDistance * maxRenderDistance; const glm::vec3 camPos = camera.getPosition(); diff --git a/src/rendering/wmo_renderer.cpp b/src/rendering/wmo_renderer.cpp index e87fc765..3fb1e44f 100644 --- a/src/rendering/wmo_renderer.cpp +++ b/src/rendering/wmo_renderer.cpp @@ -354,7 +354,7 @@ void WMORenderer::render(const Camera& camera, const glm::mat4& view, const glm: // Render all instances with instance-level culling const glm::vec3 camPos = camera.getPosition(); - const float maxRenderDistance = 3000.0f; // Don't render WMOs beyond this distance + const float maxRenderDistance = 500.0f; // Reduced for performance const float maxRenderDistanceSq = maxRenderDistance * maxRenderDistance; for (const auto& instance : instances) {