Fix lamp posts rendering as glass by narrowing window material check

F_SIDN (0x20) is the night-glow/self-illuminated flag, not a window
flag. Only F_WINDOW (0x40) should trigger transparent glass rendering.
The previous mask (0x60) caught both flags, making lamp post bases,
iron frames, and other SIDN-flagged surfaces render as transparent
glass with Fresnel reflections instead of opaque materials.
This commit is contained in:
Kelsi 2026-02-23 01:47:18 -08:00
parent bb67bfb9a3
commit 4acba4110f

View file

@ -546,9 +546,10 @@ bool WMORenderer::loadModel(const pipeline::WMOModel& model, uint32_t id) {
unlit = (matFlags & 0x01) != 0;
}
// Window materials (F_SIDN=0x20, F_WINDOW=0x40) render as
// slightly transparent reflective glass.
bool isWindow = (matFlags & 0x60) != 0;
// Only F_WINDOW (0x40) materials render as transparent glass.
// F_SIDN (0x20) is the night-glow/self-illuminated flag used on
// lamp posts, lanterns, etc. — those should NOT be glass.
bool isWindow = (matFlags & 0x40) != 0;
BatchKey key{ reinterpret_cast<uintptr_t>(tex), alphaTest, unlit };
auto& mb = batchMap[key];