From 4686a1ac748feded30fa4046ba1bc58a8692d39c Mon Sep 17 00:00:00 2001 From: Erik Date: Sun, 30 Aug 2026 21:55:24 +0200 Subject: [PATCH] probe(render): [dyn-route] DynamicLast admission trace + rain PASS note The owner''s through-wall remote-player report (standing in 0xF4180101, a player parented at 0xF4180112 - the south hall, geometrically unseeable through the cathedral - renders through opaque walls; from 0xF4180104 he is correctly hidden). The DynamicLast admission chain has three gates (indoor / old-apparatus look-in exclusion / SphereVisibleInCell against old-assembly cell planes), and gate 3 carries a known trapdoor: a zero-plane scissor-fallback slice is PASS-ALL. This trace logs, per entity ON CHANGE: parent cell, look-in exclusion hits, the viewcone verdict, and the cell''s lifted-plane shape, so one 0104<->0101 crossing with the remote player in place pins the admitting gate. Rain gate 75eab42f is owner-PASSED. Hermetic 6,762/0. Co-Authored-By: Claude Fable 5 --- docs/launch-options.md | 2 +- .../Scene/RenderScenePViewFrameProduct.cs | 36 ++++++++++++++++++- src/AcDream.App/Rendering/ViewconeCuller.cs | 17 +++++++++ 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/docs/launch-options.md b/docs/launch-options.md index 22a56fc9..5da416f0 100644 --- a/docs/launch-options.md +++ b/docs/launch-options.md @@ -315,7 +315,7 @@ issue is closed, the strip was missed; delete both. | `ACDREAM_PROBE_CHILD_CELL` | c4 route 7 | `=1` | gates one `[child-cell]` line per Runtime committed-child canonical-cell write in `RuntimeLiveEntitySessionController`, `RuntimeEntityObjectLifetime`, `RuntimeEntityDirectory` (parent/child guid, old/new cell, cause tag) | print-only | `PhysicsDiagnostics.ProbeChildCellEnabled` | | `ACDREAM_PROBE_CLIPROUTE` | "throwaway apparatus — strip once §4 ships" | `=1` | print-on-change `[clip-route]` / `[clip-route-disp]` / `[clip-route-scis]` lines: outside-slice clip routing, region-SSBO bytes, terrain-UBO head, actual GL/RHI scissor state | print-only | `RenderingDiagnostics.ProbeClipRouteEnabled` | | `ACDREAM_PROBE_WALK_SHADOW` | Campaign FW3.2b-2 flip apparatus — dies with the flip commit | `=1` | runs the PRODUCTION retail frame walk per frame in SHADOW (no draws change) and prints one `[walk-shadow]` line per frame whose visited cell/building sets diverge from the old visibility path (the I5 dual-shadow pattern applied to the FW3 static cutover) | print-only; adds the per-frame CPU cost of the shadow walk while set | `RenderingDiagnostics.ProbeWalkShadowEnabled` | -| `ACDREAM_PROBE_WALK_ROOT` | the cathedral Phase I instrumentation (synthesis doc `docs/research/2026-08-30-cathedral-synthesis.md`) — dies with that investigation | `=1` | prints `[walk-root]` rooting lines every ~30th frame AND for 8 frames after each interior/outdoor root flip (viewer/root cell, camera-cell resolution, slice count, the walk's OWN exit-view count, the TRUE root flood separated from the visited union, eye + forward); `[walk-cam]` replayable camera dumps (eye, viewport, full view-projection) every ~300 frames and at flips; `[falls]` lines on EVERY particle submission carrying a real falls owner (0xCF418000-13) with route + phase; `[falls-adm]` admission verdicts for F418 emitters (~every 120th ApplyRetailView); plus the earlier family — `[walk-part]` per-route submissions, `[walk-alpha]` drains, `[walk-dyn]` outside-stage verdicts (~120th product frame), `[walk-portal]` per-portal side/clip decisions (~90th frame) | print-only; chatty near particle-heavy scenes while set | `RenderingDiagnostics.ProbeWalkRootEnabled` | +| `ACDREAM_PROBE_WALK_ROOT` | the cathedral Phase I instrumentation (synthesis doc `docs/research/2026-08-30-cathedral-synthesis.md`) — dies with that investigation | `=1` | prints `[walk-root]` rooting lines every ~30th frame AND for 8 frames after each interior/outdoor root flip (viewer/root cell, camera-cell resolution, slice count, the walk's OWN exit-view count, the TRUE root flood separated from the visited union, eye + forward); `[walk-cam]` replayable camera dumps (eye, viewport, full view-projection) every ~300 frames and at flips; `[falls]` lines on EVERY particle submission carrying a real falls owner (0xCF418000-13) with route + phase; `[falls-adm]` admission verdicts for F418 emitters (~every 120th ApplyRetailView); plus the earlier family — `[walk-part]` per-route submissions, `[walk-alpha]` drains, `[walk-dyn]` outside-stage verdicts (~120th product frame), `[walk-portal]` per-portal side/clip decisions (~90th frame), and `[dyn-route]` per-entity ON-CHANGE DynamicLast admission traces (parent cell, look-in exclusion, viewcone verdict, the cell's lifted-plane shape — "0" marks a pass-all zero-plane slice) | print-only; chatty near particle-heavy scenes while set | `RenderingDiagnostics.ProbeWalkRootEnabled` | | `ACDREAM_PROBE_CONTACT_PLANE` | spike-only, 2026-05-20 | `=1` | gates one `[cp-write]` line per write to `CollisionInfo.ContactPlane*`/`LastKnownContactPlane*` fields (field, old→new, caller method via stack walk, source line); only logs on actual value changes | print-only, but performs a stack walk to identify the caller method when firing — real CPU cost per write while on (not just a string format); suppresses no-op writes to bound volume | `PhysicsDiagnostics.ProbeContactPlaneEnabled` | | `ACDREAM_PROBE_ENT` | #138 | `="1"` | Traces the persistent player entity across teleport streaming churn: presence in the render draw-set flat view vs. survival of the dynamics cull, to distinguish "missing from draw set" vs "present but culled" | print-only, "Observation-only — emits no behavior change" (doc comment). `LogPlayerDynOnChange` dedupes by transition to avoid per-frame spam. Marked STRIP-once-root-caused (like the dense-town FPS apparatus). | `EntityVanishProbe.Enabled` (`EntityVanishProbe.cs:23-24`), issue #138-B | | `ACDREAM_PROBE_FLAP` | "throwaway apparatus — strip once the flap mechanism is confirmed" | `=1` | EVERY FRAME (unthrottled, not change-gated) while the camera root is indoor: `[flap]` from `PortalVisibilityBuilder.Build` (portal side-test/traverse/cull/projection) + paired `[flap-cam]` from `PhysicsCameraCollisionProbe`/`[flap-sweep]` (FindCameraCell resolution, eye positions) | print-only, but unthrottled per-frame `StringBuilder` allocation + `Console.WriteLine` on multiple call sites while indoor — heavy log volume/allocation under sustained indoor play; does not alter rendered output | `RenderingDiagnostics.ProbeFlapEnabled` | diff --git a/src/AcDream.App/Rendering/Scene/RenderScenePViewFrameProduct.cs b/src/AcDream.App/Rendering/Scene/RenderScenePViewFrameProduct.cs index 22a64027..b4495fbd 100644 --- a/src/AcDream.App/Rendering/Scene/RenderScenePViewFrameProduct.cs +++ b/src/AcDream.App/Rendering/Scene/RenderScenePViewFrameProduct.cs @@ -1143,8 +1143,10 @@ internal sealed class RenderScenePViewFrameBuilder private int _dynamicCount; // ACDREAM_PROBE_WALK_ROOT companion (throwaway): rate limiter for the - // [walk-dyn] outside-stage classification dump. + // [walk-dyn] outside-stage classification dump, plus the [dyn-route] + // per-entity on-change admission cache. private uint _probeDynFrameCounter; + private readonly Dictionary _probeDynRouteStates = new(); private int _dirtyCount; private RenderSceneGeneration _indexGeneration; private ulong _indexRevision; @@ -1400,7 +1402,20 @@ internal sealed class RenderScenePViewFrameBuilder // would draw it after the boundary alpha drain and overpaint // nearer flames (the Holtburg candle-behind-door class). if (indoor && _lookInCellScratch.Contains(parentCellId!.Value)) + { + if (AcDream.Core.Rendering.RenderingDiagnostics.ProbeWalkRootEnabled) + { + string state = $"parent={parentCellId.Value:x8} lookin-excluded"; + if (!_probeDynRouteStates.TryGetValue(record.Source.LocalEntityId, out string? prev) + || prev != state) + { + _probeDynRouteStates[record.Source.LocalEntityId] = state; + Console.WriteLine( + $"[dyn-route] id={record.Source.LocalEntityId:x} {state}"); + } + } continue; + } Sphere(in record, out Vector3 center, out float radius); bool visible = indoor @@ -1411,6 +1426,25 @@ internal sealed class RenderScenePViewFrameBuilder : input.Viewcone.SphereVisibleOutside( in center, radius); + // ACDREAM_PROBE_WALK_ROOT companion (throwaway): the DynamicLast + // admission trace for the through-wall remote-player report — + // per entity, ON CHANGE: parent cell, look-in exclusion, the + // viewcone verdict, and the cell's lifted-plane shape ("0" = a + // pass-all zero-plane slice — the scissor-fallback trapdoor). + if (AcDream.Core.Rendering.RenderingDiagnostics.ProbeWalkRootEnabled + && indoor) + { + string state = + $"parent={parentCellId!.Value:x8} vis={(visible ? 1 : 0)} " + + $"cone={input.Viewcone.ProbeDescribeCell(parentCellId.Value)}"; + if (!_probeDynRouteStates.TryGetValue(record.Source.LocalEntityId, out string? prev) + || prev != state) + { + _probeDynRouteStates[record.Source.LocalEntityId] = state; + Console.WriteLine( + $"[dyn-route] id={record.Source.LocalEntityId:x} {state} route=DynamicLast"); + } + } if (!visible) continue; diff --git a/src/AcDream.App/Rendering/ViewconeCuller.cs b/src/AcDream.App/Rendering/ViewconeCuller.cs index d686deeb..572c8b50 100644 --- a/src/AcDream.App/Rendering/ViewconeCuller.cs +++ b/src/AcDream.App/Rendering/ViewconeCuller.cs @@ -166,6 +166,23 @@ public sealed class ViewconeCuller return true; } + /// ACDREAM_PROBE_WALK_ROOT companion (throwaway): a cell's + /// lifted-plane shape for the [dyn-route] admission trace — "none" + /// (culls), or per-slice plane counts ("0" = a pass-all zero-plane + /// slice, the scissor-fallback trapdoor). + internal string ProbeDescribeCell(uint cellId) + { + if (!_cellPlanes.TryGetValue(cellId, out PlaneSet? set)) + return "none"; + var sb = new System.Text.StringBuilder(); + for (int s = 0; s < set.Slices.Count; s++) + { + if (sb.Length > 0) sb.Append('+'); + sb.Append(set.Slices[s].Count); + } + return sb.Length == 0 ? "empty" : sb.ToString(); + } + /// Sphere-vs-the-cell's-views: visible when any slice passes. /// A cell with no views culls (not in the draw list ⇒ never reached in /// retail). A zero-plane slice is pass-all.