Fix lamp posts as glass and hide distance-only LOD groups when close

Two WMO rendering fixes:

1. Glass batch merging: BatchKey didn't include isWindow, so window and
   non-window batches sharing the same texture got merged together. If
   the window batch was processed first, the entire merged batch (lamp
   base, iron frame, etc.) rendered as transparent glass. Add isWindow
   to the batch key so glass/non-glass batches stay separate.

2. LOD group culling: WMO groups named with "LOD" are distance-only
   impostor geometry (e.g. cathedral tower extension, hill tower). They
   should only render beyond 200 units. Store raw MOGN chunk for
   offset-based name lookup, detect "lod" in group names during load,
   and skip LOD groups in both main and shadow passes when camera is
   within range.
This commit is contained in:
Kelsi 2026-02-23 01:54:05 -08:00
parent 4acba4110f
commit 3ffb7ccc50
4 changed files with 49 additions and 5 deletions

View file

@ -346,6 +346,7 @@ private:
uint32_t groupFlags = 0;
bool allUntextured = false; // True if ALL batches use fallback white texture (collision/placeholder group)
bool isLOD = false; // Distance-only group (skip when camera is close)
// Material batches (start index, count, material ID)
struct Batch {