From dd3f9e5b9e3883b91f6ffab91fc140b6ee4a7e57 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 10 Mar 2026 12:11:13 -0700 Subject: [PATCH] wmo: enable portal culling by default after AABB transform fix The AABB transform bug (direct min/max transform was wrong for rotated WMOs) was fixed in a prior commit. Portal culling now uses the correct world-space AABB computed from all 8 corners, so frustum intersection is valid. The AABB-based test is conservative (no portal plane-side check): a visible portal can only be incorrectly INCLUDED, never EXCLUDED. This means no geometry can disappear, and any overdraw is handled by the z-buffer. Enable by default to get the performance benefit inside WMOs and dungeons. --- include/rendering/wmo_renderer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rendering/wmo_renderer.hpp b/include/rendering/wmo_renderer.hpp index 50261865..136cbc0e 100644 --- a/include/rendering/wmo_renderer.hpp +++ b/include/rendering/wmo_renderer.hpp @@ -696,7 +696,7 @@ private: // Rendering state bool wireframeMode = false; bool frustumCulling = true; - bool portalCulling = false; // Disabled by default - needs debugging + bool portalCulling = true; // AABB transform bug fixed; conservative frustum test (no plane-side check) is visually safe bool distanceCulling = false; // Disabled - causes ground to disappear float maxGroupDistance = 500.0f; float maxGroupDistanceSq = 250000.0f; // maxGroupDistance^2