From d581f4c5494cdfb14791ce908bbfe248f1d743d3 Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 29 May 2026 12:36:46 +0200 Subject: [PATCH] =?UTF-8?q?fix(render):=20Phase=20A8.F=20=E2=80=94=20MarkA?= =?UTF-8?q?ndPunchNdc=20sets=20[stencil]=20probe=20vert=20count=20(honest?= =?UTF-8?q?=20Task=209=20gate=20evidence)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AcDream.App/Rendering/IndoorCellStencilPipeline.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/AcDream.App/Rendering/IndoorCellStencilPipeline.cs b/src/AcDream.App/Rendering/IndoorCellStencilPipeline.cs index 7958e44..a35b8c7 100644 --- a/src/AcDream.App/Rendering/IndoorCellStencilPipeline.cs +++ b/src/AcDream.App/Rendering/IndoorCellStencilPipeline.cs @@ -276,7 +276,7 @@ public sealed unsafe class IndoorCellStencilPipeline : IDisposable // Triangulate the region (fan per convex polygon) into NDC Vector3 (z=0). int triVerts = 0; foreach (var p in region) if (!p.IsEmpty) triVerts += (p.Vertices.Length - 2) * 3; - if (triVerts == 0) { _lastVertexCount = 0; return; } + if (triVerts == 0) { _lastVertexCount = 0; LastStencilVertexCount = 0; LastStencilBuildingId = 0; return; } var verts = new Vector3[triVerts]; int idx = 0; @@ -299,6 +299,12 @@ public sealed unsafe class IndoorCellStencilPipeline : IDisposable _gl.BindBuffer(BufferTargetARB.ArrayBuffer, 0); _lastVertexCount = triVerts; + // Phase A8.F: expose the clipped-mask vert count to the [stencil] probe so the Task 9 + // visual-gate evidence reflects the recursively-clipped OutsideView (building id 0 = N/A). + LastStencilVertexCount = triVerts; + LastStencilWasFarPunch = true; + LastStencilBuildingId = 0; + // Same GL state machine as MarkAndPunch, but identity VP (verts are already NDC). var identity = Matrix4x4.Identity;