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.
This commit is contained in:
Kelsi 2026-03-10 12:11:13 -07:00
parent 8856af6b2d
commit dd3f9e5b9e

View file

@ -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