diff --git a/src/AcDream.App/Rendering/GameWindow.cs b/src/AcDream.App/Rendering/GameWindow.cs index d75cd66..af984ae 100644 --- a/src/AcDream.App/Rendering/GameWindow.cs +++ b/src/AcDream.App/Rendering/GameWindow.cs @@ -10710,6 +10710,34 @@ public sealed class GameWindow : IDisposable gl.DepthMask(true); } + // FIX 2026-05-28 (post-third-visual-gate): render IndoorPass entities. + // EnvCellRenderer covers cell GEOMETRY (floor, walls baked into the + // cell's CellStruct). But cottages ALSO have IsBuildingShell entities + // — landblock-baked GfxObjs representing exterior wall slabs that + // aren't part of any cell's CellStruct. Pre-A8 rendered these via + // Dispatcher.Draw(set: IndoorPass); WB's algorithm assumes its + // StaticObjectManager.Render handles them in Step 4. Our EntitySet + // partition puts IsBuildingShell into IndoorPass (not OutdoorScenery), + // so Step 4's `Draw(set: OutdoorScenery)` misses them entirely. + // Result with the missing call: user reports "house missing lots of + // walls" — the cottage's exterior wall slabs aren't drawn. + // + // Render IndoorPass between Step 3 and Step 4, with the + // currentEnvCellIds filter narrowing cell stabs but NOT the building + // shells (they have no ParentCellId and pass through). Depth-test + // with DepthFunc.Less so cottage-A's near walls occlude cottage-B's + // far walls. NO stencil — we want them rendered unconditionally + // inside the camera-building. + if (camBuildings.Count > 0) + { + _meshShader!.Use(); + _wbDrawDispatcher!.Draw(camera, _worldState.LandblockEntries, frustum, + neverCullLandblockId: playerLb, + visibleCellIds: currentEnvCellIds, + animatedEntityIds: animatedIds, + set: AcDream.App.Rendering.Wb.WbDrawDispatcher.EntitySet.IndoorPass); + } + EmitEnvCellProbe(camBuildings.Count, otherBuildings.Count, currentEnvCellIds.Count); // Step 4: stencil-gated outdoor (terrain + scenery + static objects).