From 4acba4110fae5596763d59c691c161908ba469a3 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Mon, 23 Feb 2026 01:47:18 -0800 Subject: [PATCH] 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. --- src/rendering/wmo_renderer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rendering/wmo_renderer.cpp b/src/rendering/wmo_renderer.cpp index 2768b5df..6add507e 100644 --- a/src/rendering/wmo_renderer.cpp +++ b/src/rendering/wmo_renderer.cpp @@ -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(tex), alphaTest, unlit }; auto& mb = batchMap[key];