Optimize WMO rendering and collision performance

- Add texture-sorted batch merging with glMultiDrawElements to reduce draw calls
- Pre-compute merged batches at load time instead of per-frame
- Add persistent floor height cache with disk save/load (cache/wmo_floor_cache.bin)
- Reduce collision focus radius and sweep steps for faster collision checks
- Add floor cache size to performance HUD
- Reduce WMO group distance culling to 80 units
This commit is contained in:
Kelsi 2026-02-05 17:20:30 -08:00
parent 44b03a06a0
commit a96ea0758c
7 changed files with 229 additions and 40 deletions

View file

@ -370,11 +370,10 @@ void PerformanceHUD::render(const Renderer* renderer, const Camera* camera) {
ImGui::Text("Instances: %u", wmoRenderer->getInstanceCount());
ImGui::Text("Triangles: %u", wmoRenderer->getTotalTriangleCount());
ImGui::Text("Draw Calls: %u", wmoRenderer->getDrawCallCount());
ImGui::Text("Floor Cache: %zu", wmoRenderer->getFloorCacheSize());
ImGui::Text("Dist Culled: %u groups", wmoRenderer->getDistanceCulledGroups());
if (wmoRenderer->isOcclusionCullingEnabled()) {
ImGui::Text("Occlusion Culled: %u groups", wmoRenderer->getOcclusionCulledGroups());
}
if (wmoRenderer->isDistanceCullingEnabled()) {
ImGui::Text("Distance Culled: %u groups", wmoRenderer->getDistanceCulledGroups());
ImGui::Text("Occl Culled: %u groups", wmoRenderer->getOcclusionCulledGroups());
}
if (wmoRenderer->isPortalCullingEnabled()) {
ImGui::Text("Portal Culled: %u groups", wmoRenderer->getPortalCulledGroups());