fix(render): FW4 slice 1 - interior outside-view slices come from the walk
The FW3 visual gate's stairwell/grass transition flash (grass briefly covering floor openings at doorway crossings - the #119 family) was the FW3 dual path leaking: the walk decided WHETHER terrain draws while the old PortalVisibilityBuilder assembly decided WHERE (slice planes, count, scissor), and punch fans indexed the old slice array with walk view indices. The new ACDREAM_PROBE_WALK_ROOT apparatus pinned the boundary frames: fat/degenerate old-apparatus exit views splash terrain over interior pixels, the interior depth-clear preserves color, and cells absent from the walk's flood never repaint. Retail has ONE visibility structure and cannot produce this. ClipFrameAssembler.ReassembleOutsideViewFromWalk now materializes the walk's own outside_view (pixel screen points -> standard NDC -> the existing ClipPlaneSet machinery) into the assembly's outside-view block after Collect, ahead of the single PrepareClipFrame publication (moved below the walk block). The Landscape event carries the walk's active view count on the record's existing OutsideViewCount field (trace mapping compares kind only - zero oracle-fixture churn) and the driver fans exactly that many terrain slices; activeTerrainSliceCount is deleted end to end. Outdoor roots keep the assembler's single full-screen slice, asserted ==1. Hermetic 6,762/0 (4 new materializer tests pin the y-flip and plane-sign conventions), Walk lane 209/1, InstalledDat walk conformance 40/1. Seals/cell slices/look-in seeding stay on the old per-cell views for the rest of FW4 (identical dat polygons; only the visible set can differ). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
8f8b0b9c57
commit
37febd1fe6
11 changed files with 468 additions and 44 deletions
|
|
@ -233,8 +233,7 @@ public sealed class WalkFrameDriverTests
|
|||
using DrawScope draw = fx.BeginDraw();
|
||||
driver.RunFrame(
|
||||
walk, cameraCellId: cell1.CellId, cameraCell: cell1, landscape: landscape,
|
||||
ctx, draw.Frame, draw.Pass, Matrix4x4.Identity, cameraWorldPosition: Vector3.Zero,
|
||||
activeTerrainSliceCount: 1);
|
||||
ctx, draw.Frame, draw.Pass, Matrix4x4.Identity, cameraWorldPosition: Vector3.Zero);
|
||||
|
||||
Assert.Equal(
|
||||
new[]
|
||||
|
|
@ -306,8 +305,7 @@ public sealed class WalkFrameDriverTests
|
|||
using DrawScope draw = fx.BeginDraw();
|
||||
driver.RunFrame(
|
||||
walk, cameraCellId: cell1.CellId, cameraCell: cell1, landscape: new WalkLandscape(),
|
||||
ctx, draw.Frame, draw.Pass, Matrix4x4.Identity, cameraWorldPosition: Vector3.Zero,
|
||||
activeTerrainSliceCount: 0);
|
||||
ctx, draw.Frame, draw.Pass, Matrix4x4.Identity, cameraWorldPosition: Vector3.Zero);
|
||||
|
||||
// No SKY/TERRAIN — ov==0 means DrawInside never calls DrawLandscape
|
||||
// at all — but CLEAR/SEALS still fire unconditionally.
|
||||
|
|
@ -401,7 +399,7 @@ public sealed class WalkFrameDriverTests
|
|||
Assert.Equal(1, activeView.ViewCount);
|
||||
|
||||
using DrawScope draw = fx.BeginDraw();
|
||||
driver.BeginFrame(ctx, Matrix4x4.Identity, Vector3.Zero, activeTerrainSliceCount: 0);
|
||||
driver.BeginFrame(ctx, Matrix4x4.Identity, Vector3.Zero);
|
||||
walk.DrawBuilding(building, activeView, ctx, driver);
|
||||
driver.EndFrame();
|
||||
driver.Replay(draw.Frame, draw.Pass);
|
||||
|
|
@ -434,7 +432,7 @@ public sealed class WalkFrameDriverTests
|
|||
var driver = new WalkFrameDriver(fx.Dispatcher, new RecordingLeafRenderer(log), new FakeWorldData());
|
||||
|
||||
using DrawScope draw = fx.BeginDraw();
|
||||
driver.BeginFrame(ctx, Matrix4x4.Identity, Vector3.Zero, activeTerrainSliceCount: 0);
|
||||
driver.BeginFrame(ctx, Matrix4x4.Identity, Vector3.Zero);
|
||||
|
||||
Assert.Throws<InvalidOperationException>(
|
||||
() => ((IWalkEventSink)driver).Emit(WalkEvent.DrawCells(0, [0x100u])));
|
||||
|
|
@ -451,15 +449,15 @@ public sealed class WalkFrameDriverTests
|
|||
var driver = new WalkFrameDriver(fx.Dispatcher, new RecordingLeafRenderer(log), new FakeWorldData());
|
||||
|
||||
using DrawScope draw = fx.BeginDraw();
|
||||
driver.BeginFrame(ctx, Matrix4x4.Identity, Vector3.Zero, activeTerrainSliceCount: 0);
|
||||
driver.BeginFrame(ctx, Matrix4x4.Identity, Vector3.Zero);
|
||||
|
||||
Assert.Throws<InvalidOperationException>(
|
||||
() => driver.BeginFrame(
|
||||
ctx, Matrix4x4.Identity, Vector3.Zero, activeTerrainSliceCount: 0));
|
||||
ctx, Matrix4x4.Identity, Vector3.Zero));
|
||||
|
||||
driver.EndFrame();
|
||||
// EndFrame cleared the open-frame guard: BeginFrame is usable again.
|
||||
driver.BeginFrame(ctx, Matrix4x4.Identity, Vector3.Zero, activeTerrainSliceCount: 0);
|
||||
driver.BeginFrame(ctx, Matrix4x4.Identity, Vector3.Zero);
|
||||
driver.EndFrame();
|
||||
}
|
||||
|
||||
|
|
@ -488,7 +486,7 @@ public sealed class WalkFrameDriverTests
|
|||
var driver = new WalkFrameDriver(fx.Dispatcher, new RecordingLeafRenderer(log), new FakeWorldData());
|
||||
|
||||
using DrawScope draw = fx.BeginDraw();
|
||||
driver.BeginFrame(ctx, Matrix4x4.Identity, Vector3.Zero, activeTerrainSliceCount: 0);
|
||||
driver.BeginFrame(ctx, Matrix4x4.Identity, Vector3.Zero);
|
||||
|
||||
Assert.Throws<InvalidOperationException>(() => driver.Replay(draw.Frame, draw.Pass));
|
||||
}
|
||||
|
|
@ -516,7 +514,7 @@ public sealed class WalkFrameDriverTests
|
|||
using DrawScope draw = fx.BeginDraw();
|
||||
driver.Collect(
|
||||
walk, cameraCellId: 0u, cameraCell: null, landscape, ctx,
|
||||
Matrix4x4.Identity, cameraWorldPosition: Vector3.Zero, activeTerrainSliceCount: 1);
|
||||
Matrix4x4.Identity, cameraWorldPosition: Vector3.Zero);
|
||||
|
||||
// No GPU calls at all yet — Collect is CPU-only.
|
||||
Assert.Empty(log);
|
||||
|
|
@ -549,7 +547,7 @@ public sealed class WalkFrameDriverTests
|
|||
fx.Dispatcher, new RecordingLeafRenderer(log), worldData, new RecordingTrace(log));
|
||||
|
||||
using DrawScope draw = fx.BeginDraw();
|
||||
driver.BeginFrame(ctx, Matrix4x4.Identity, Vector3.Zero, activeTerrainSliceCount: 0);
|
||||
driver.BeginFrame(ctx, Matrix4x4.Identity, Vector3.Zero);
|
||||
((IWalkEventSink)driver).OnLandscapeCellTurn(0x8C040005u);
|
||||
Assert.Empty(log); // no GPU work at Collect time; nothing recorded to the log yet
|
||||
driver.EndFrame();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue