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

@ -216,6 +216,7 @@ struct WMOModel {
// Group names
std::vector<std::string> groupNames;
std::vector<uint8_t> groupNameRaw; // Raw MOGN chunk for offset-based name lookup
bool isValid() const {
return nGroups > 0 && !groups.empty();