From 08f6a0c1cec0eb308ed82f9cc9f262a8f82f53b0 Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 29 May 2026 12:20:59 +0200 Subject: [PATCH] =?UTF-8?q?docs(render):=20Phase=20A8.F=20=E2=80=94=20note?= =?UTF-8?q?=20why=20MarkAndPunchNdc=20omits=20DepthClamp=20(NDC=20z=3D0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AcDream.App/Rendering/IndoorCellStencilPipeline.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/AcDream.App/Rendering/IndoorCellStencilPipeline.cs b/src/AcDream.App/Rendering/IndoorCellStencilPipeline.cs index 4ee53e1..7958e44 100644 --- a/src/AcDream.App/Rendering/IndoorCellStencilPipeline.cs +++ b/src/AcDream.App/Rendering/IndoorCellStencilPipeline.cs @@ -308,6 +308,9 @@ public sealed unsafe class IndoorCellStencilPipeline : IDisposable _gl.Clear(ClearBufferMask.StencilBufferBit); // Step 1: mark bit 1. + // No DepthClamp here (unlike MarkAndPunch): MarkAndPunch draws world-space portal + // polygons that can fall outside [near,far]; these verts are already NDC with z=0, + // always within the depth range, so there is nothing to clamp. _gl.ColorMask(false, false, false, false); _gl.DepthMask(false); _gl.DepthFunc(DepthFunction.Always);