From 872dd34943889d9c637e355bd51207c2ca6fa21a Mon Sep 17 00:00:00 2001 From: Erik Date: Tue, 2 Jun 2026 16:24:23 +0200 Subject: [PATCH] =?UTF-8?q?docs(render):=20Phase=20W=20Stage=204=20?= =?UTF-8?q?=E2=80=94=20verify=20ceiling-sealed=20/=20terrain-viewpoint=20/?= =?UTF-8?q?=20GL-state=20+=20ParentCellId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit T4.4: annotate EnvCellRenderer.RegisterCell to document that ceilings are present by construction. PrepareCellStructMeshData iterates ALL CellStruct.Polygons (floor + walls + ceiling) with no surface filter; retail PView::DrawCells draws the same closed-box drawing_bsp. No ceiling filtering confirmed. T4.2: annotate TerrainModernRenderer.Draw to document that terrain projects from the passed-in ICamera (uView + uProjection derive from the same camera as all other renderers). No separate landscape viewpoint exists that could desync from the eye. T4.5, T5.1, T5.2: pure verification — no code changes (see report). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/AcDream.App/Rendering/TerrainModernRenderer.cs | 6 ++++++ src/AcDream.App/Rendering/Wb/EnvCellRenderer.cs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/AcDream.App/Rendering/TerrainModernRenderer.cs b/src/AcDream.App/Rendering/TerrainModernRenderer.cs index 006e5d8..d077a3e 100644 --- a/src/AcDream.App/Rendering/TerrainModernRenderer.cs +++ b/src/AcDream.App/Rendering/TerrainModernRenderer.cs @@ -260,6 +260,12 @@ public sealed unsafe class TerrainModernRenderer : IDisposable } // Bind shader + uniforms + atlas handles. + // Verified Phase W Stage 4 (T4.2): terrain projects from the camera view-proj; + // no separate landscape viewpoint to sync. Both uView and uProjection derive + // from the ICamera passed into this method — the same camera used for all other + // renderers in the unified pipeline. Retail's LScape::update_viewpoint + // pre-positions terrain to the outdoor landcell, but acdream uses the + // unified camera matrix everywhere, so no separate viewpoint divergence can occur. _shader.Use(); _shader.SetMatrix4("uView", camera.View); _shader.SetMatrix4("uProjection", camera.Projection); diff --git a/src/AcDream.App/Rendering/Wb/EnvCellRenderer.cs b/src/AcDream.App/Rendering/Wb/EnvCellRenderer.cs index 441d0fc..0e6e47e 100644 --- a/src/AcDream.App/Rendering/Wb/EnvCellRenderer.cs +++ b/src/AcDream.App/Rendering/Wb/EnvCellRenderer.cs @@ -312,6 +312,12 @@ public sealed unsafe class EnvCellRenderer : IDisposable // 2. Trigger mesh prep for the cell geometry on ObjectMeshManager. // This populates ObjectMeshManager._renderData[cellGeomId] when complete. + // Verified Phase W Stage 4 (T4.4): ceilings are present by construction. + // PrepareCellStructMeshData iterates ALL polygons in CellStruct.Polygons + // (floor + 4 walls + ceiling, as authored in the EnvCell dat mesh) with NO + // surface filter — every polygon that passes the ≥3-vertex check is added to + // the batch. Retail PView::DrawCells draws cell->structure->drawing_bsp which + // is the same closed-box structure. No ceiling polygons are dropped. _ = _meshManager.PrepareEnvCellGeomMeshDataAsync(cellGeomId, envCell.EnvironmentId, envCell.CellStructure, envCell.Surfaces);