fix(render): Phase A8.F — MarkAndPunchNdc sets [stencil] probe vert count (honest Task 9 gate evidence)

This commit is contained in:
Erik 2026-05-29 12:36:46 +02:00
parent 9e2eb909da
commit d581f4c549

View file

@ -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;