probe(render): cathedral Phase I instrumentation
Implements the synthesis plan''s Phase I (instrument-first, no rendering edits): the [falls] watch printing EVERY particle submission carrying a real falls owner (the outdoor landblock emitters 0xCF418000-13 the six fix rounds never traced) with route + phase; [falls-adm] admission verdicts for F418 emitters at the retail ShouldDrawParticles port (owner, cell, distance, in-set, eligibility); the continuous [walk-root] line now separating the TRUE root flood (InteriorFloodCells) from the visited union (root + look-ins - the conflation the review corpus indicted) and printing the walk''s own exit-view count; [walk-cam] replayable camera dumps; and the restored [walk-portal] per-portal side/clip decisions. All under the existing ACDREAM_PROBE_WALK_ROOT flag; the depth-checkpoint readback is deferred until these answers narrow the question (mid-pass Vulkan depth reads need render-pass splitting). Hermetic 6,762/0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
6d990d38b3
commit
f4522297cc
5 changed files with 104 additions and 10 deletions
|
|
@ -343,9 +343,15 @@ public sealed class RetailPViewRenderer
|
|||
walkExecutor!, ctx, clipAssembly, clearInteriorDepth, drawExitSeals);
|
||||
walkDriver = new Walk.WalkFrameDriver(walkExecutor!.Dispatcher, leafRenderer, _walkWorldData);
|
||||
|
||||
if (AcDream.Core.Rendering.RenderingDiagnostics.ProbeWalkRootEnabled)
|
||||
{
|
||||
AcDream.Core.Rendering.RenderingDiagnostics.WalkPortalProbeThisFrame =
|
||||
_probeWalkRootFrame % 90 == 0;
|
||||
}
|
||||
walkDriver.Collect(
|
||||
_frameWalk, ctx.ViewerCellId, walkCameraCell, walkLandscape, walkContext,
|
||||
ctx.ViewProjection, ctx.CameraWorldPosition);
|
||||
AcDream.Core.Rendering.RenderingDiagnostics.WalkPortalProbeThisFrame = false;
|
||||
|
||||
// FW4 slice 1: an interior root's terrain/sky/punch clip slices
|
||||
// come from THE WALK'S OWN outside_view — retail's one
|
||||
|
|
@ -363,31 +369,55 @@ public sealed class RetailPViewRenderer
|
|||
viewportHeight);
|
||||
}
|
||||
|
||||
// Phase I cathedral instrumentation (synthesis §Phase I.3): the
|
||||
// continuous rooting line SEPARATES the true root flood
|
||||
// (InteriorFloodCells) from the visited union (root + look-ins —
|
||||
// the conflation the review corpus indicted), and adds the
|
||||
// walk's OWN exit-view count. [walk-cam] dumps a replayable
|
||||
// camera every ~300 frames and at every root flip.
|
||||
if (AcDream.Core.Rendering.RenderingDiagnostics.ProbeWalkRootEnabled)
|
||||
{
|
||||
_probeWalkRootFrame++;
|
||||
bool outdoorNow = ctx.RootCell.IsOutdoorNode;
|
||||
if (_probeWalkRootPrevOutdoor is bool prev && prev != outdoorNow)
|
||||
bool flipped = _probeWalkRootPrevOutdoor is bool prev && prev != outdoorNow;
|
||||
if (flipped)
|
||||
{
|
||||
_probeWalkRootFramesLeft = 8;
|
||||
Console.WriteLine(
|
||||
$"[walk-root] ---- FLIP {(prev ? "OUT->IN" : "IN->OUT")} at frame {_probeWalkRootFrame} ----");
|
||||
$"[walk-root] ---- FLIP {(outdoorNow ? "IN->OUT" : "OUT->IN")} at frame {_probeWalkRootFrame} ----");
|
||||
}
|
||||
_probeWalkRootPrevOutdoor = outdoorNow;
|
||||
bool sample = _probeWalkRootFramesLeft > 0 || _probeWalkRootFrame % 30 == 0;
|
||||
if (_probeWalkRootFramesLeft > 0)
|
||||
{
|
||||
_probeWalkRootFramesLeft--;
|
||||
var cellsList = new List<uint>(walkDriver.VisitedCells);
|
||||
cellsList.Sort();
|
||||
string cells = string.Join(",", cellsList.ConvertAll(c => c.ToString("x8"))
|
||||
.GetRange(0, Math.Min(cellsList.Count, 10)));
|
||||
if (sample)
|
||||
{
|
||||
List<uint> rootFlood = walkDriver.InteriorFloodCells;
|
||||
string flood = string.Join(",", rootFlood
|
||||
.GetRange(0, Math.Min(rootFlood.Count, 8))
|
||||
.ConvertAll(c => c.ToString("x8")));
|
||||
int walkOv = outdoorNow ? -1 : _frameWalk.InteriorOutsideView.ViewCount;
|
||||
Vector3 fwd = walkContext.CyPlane.Normal;
|
||||
Console.WriteLine(
|
||||
$"[walk-root] f={_probeWalkRootFrame} out={(outdoorNow ? 1 : 0)} "
|
||||
+ $"viewer=0x{ctx.ViewerCellId:X8} root=0x{ctx.RootCell.CellId:X8} "
|
||||
+ $"res={ctx.CameraCellResolution} slices={clipAssembly.OutsideViewSlices.Length} "
|
||||
+ $"walkOv={walkOv} rootFlood={rootFlood.Count}[{flood}] "
|
||||
+ $"visited={walkDriver.VisitedCells.Count} bld={walkDriver.VisitedBuildings.Count} "
|
||||
+ $"eye=({ctx.ViewerEyePos.X:F2},{ctx.ViewerEyePos.Y:F2},{ctx.ViewerEyePos.Z:F2}) "
|
||||
+ $"walkCells={walkDriver.VisitedCells.Count} bld={walkDriver.VisitedBuildings.Count} "
|
||||
+ $"cells=[{cells}]");
|
||||
+ $"fwd=({fwd.X:F3},{fwd.Y:F3},{fwd.Z:F3})");
|
||||
}
|
||||
if (flipped || _probeWalkRootFrame % 300 == 0)
|
||||
{
|
||||
Matrix4x4 vp = ctx.ViewProjection;
|
||||
Console.WriteLine(
|
||||
$"[walk-cam] viewer=0x{ctx.ViewerCellId:X8} "
|
||||
+ $"eye=({ctx.ViewerEyePos.X:R},{ctx.ViewerEyePos.Y:R},{ctx.ViewerEyePos.Z:R}) "
|
||||
+ $"vw={viewportWidth:R} vh={viewportHeight:R} vp=["
|
||||
+ $"{vp.M11:R},{vp.M12:R},{vp.M13:R},{vp.M14:R},"
|
||||
+ $"{vp.M21:R},{vp.M22:R},{vp.M23:R},{vp.M24:R},"
|
||||
+ $"{vp.M31:R},{vp.M32:R},{vp.M33:R},{vp.M34:R},"
|
||||
+ $"{vp.M41:R},{vp.M42:R},{vp.M43:R},{vp.M44:R}]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue