diag(render): Phase A8 [vis] probe — light up dormant ProbeVisibilityEnabled
Wires the dormant RenderingDiagnostics.ProbeVisibilityEnabled flag (added 2026-05-25 by Task 6 of the original A8 plan, no probe code) to per-frame [vis] log lines around the render-frame branch decision. Captures camera position, cameraInsideCell (lenient grace-aware), the strict PointInCell result, the visibility CameraCell id, and VisibleCellIds count/list. Enable via ACDREAM_PROBE_VIS=1. Used during A8 RR0 falsification spike (2026-05-26) — see docs/research/2026-05-26-a8-rr0-falsification-findings.md. Kept as long- term diagnostic for the upcoming RR8/RR10 visual verification gates. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
651e7e22fb
commit
84c4a70296
1 changed files with 42 additions and 0 deletions
|
|
@ -7011,6 +7011,44 @@ public sealed class GameWindow : IDisposable
|
|||
var visibility = _cellVisibility.ComputeVisibility(camPos);
|
||||
bool cameraInsideCell = visibility?.CameraCell is not null;
|
||||
|
||||
// SPIKE 2026-05-26: A8 transition investigation. Lights up the
|
||||
// dormant RenderingDiagnostics.ProbeVisibilityEnabled flag (added
|
||||
// by Task 6 of the original A8 plan). Per-frame state captures:
|
||||
// camera position, lenient + strict inside flags side-by-side,
|
||||
// CameraCell id, VisibleCellIds list. Branch markers inside
|
||||
// indoor + outdoor branches complete the trace.
|
||||
// Enable via ACDREAM_PROBE_VIS=1.
|
||||
if (AcDream.Core.Rendering.RenderingDiagnostics.ProbeVisibilityEnabled)
|
||||
{
|
||||
bool reallyInsideProbe = visibility?.CameraCell is not null
|
||||
&& CellVisibility.PointInCell(camPos, visibility.CameraCell);
|
||||
int visCount = visibility?.VisibleCellIds?.Count ?? 0;
|
||||
string visList;
|
||||
if (visibility?.VisibleCellIds is null || visCount == 0)
|
||||
{
|
||||
visList = "[]";
|
||||
}
|
||||
else
|
||||
{
|
||||
var sb = new System.Text.StringBuilder("[");
|
||||
int shown = 0;
|
||||
foreach (var id in visibility.VisibleCellIds)
|
||||
{
|
||||
if (shown >= 8) { sb.Append(",..."); break; }
|
||||
if (shown > 0) sb.Append(',');
|
||||
sb.Append($"0x{id:X8}");
|
||||
shown++;
|
||||
}
|
||||
sb.Append(']');
|
||||
visList = sb.ToString();
|
||||
}
|
||||
string cellId = visibility?.CameraCell?.CellId.ToString("X8") ?? "null";
|
||||
Console.WriteLine(
|
||||
$"[vis] pos=({camPos.X:F2},{camPos.Y:F2},{camPos.Z:F2}) " +
|
||||
$"inside={cameraInsideCell} really={reallyInsideProbe} " +
|
||||
$"cell=0x{cellId} visN={visCount} {visList}");
|
||||
}
|
||||
|
||||
// Lighting decisions (sun zeroed, indoor ambient applied) must
|
||||
// track the PLAYER's cell, not the camera's. In third-person
|
||||
// chase mode the camera enters interiors before the player body
|
||||
|
|
@ -7174,6 +7212,8 @@ public sealed class GameWindow : IDisposable
|
|||
if (cameraReallyInside && _indoorStencilPipeline is not null
|
||||
&& visibility?.CameraCell is not null)
|
||||
{
|
||||
if (AcDream.Core.Rendering.RenderingDiagnostics.ProbeVisibilityEnabled)
|
||||
Console.WriteLine("[vis] branch=indoor");
|
||||
// Phase A8 R3 — WB RenderInsideOut order.
|
||||
//
|
||||
// 1. Terrain has already drawn (color + depth) at line ~7104.
|
||||
|
|
@ -7233,6 +7273,8 @@ public sealed class GameWindow : IDisposable
|
|||
}
|
||||
else
|
||||
{
|
||||
if (AcDream.Core.Rendering.RenderingDiagnostics.ProbeVisibilityEnabled)
|
||||
Console.WriteLine("[vis] branch=outdoor");
|
||||
// Outdoor path — unchanged from pre-A8: single dispatcher call
|
||||
// walks every entity with default EntitySet.All partition.
|
||||
_wbDrawDispatcher!.Draw(camera, _worldState.LandblockEntries, frustum,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue