fix #131 (root cause 4, structurally forced): look-in cells draw their DYNAMICS - the town portal is a server object in the hall's porch cell
The headless replay of the captured indoor frame proved the look-in flood ADMITS the porch 0x017A (Diagnostic_LookInFlood_AdmitsHallPorchFromCottage: 14 cells). So the portal (a SERVER object - the teleport proves it - with ParentCellId 0xA9B4017A) routes to partition.Dynamics and draws NOWHERE under an interior root: dynamics-last viewcone-culls it (the main cone has no look-in cells) and post-seal it would z-fail beyond the root's door plane (the #118 lesson). This is AP-33's own recorded deferral - 'look-in DYNAMICS are not drawn' - the deferred case was the most-stared-at object in town. Outdoors the merge path puts the porch in the main cone -> drawn -> 'appears when I walk out'. Fix: DrawBuildingLookIns pass 2 draws look-in-cell dynamics with the statics (whole, AP-33 over-include) and their emitters ride the same DrawCellParticles call. No double-draw: dynamics-last keeps culling them; DrawDynamicsParticles only sees its cone survivors. #124 CLOSED by user gate same session. AP-33 row updated. Suites: App 261+1skip / Core 1439+2skip / UI 420 / Net 294 green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
47f32cd45c
commit
d208002bf8
4 changed files with 89 additions and 27 deletions
|
|
@ -19,6 +19,49 @@ public class Issue131SetupProbeTests
|
|||
private readonly ITestOutputHelper _out;
|
||||
public Issue131SetupProbeTests(ITestOutputHelper output) => _out = output;
|
||||
|
||||
/// <summary>#131: from the captured cottage-interior frame (the user's
|
||||
/// portal-missing viewpoint), does the look-in flood admit the hall's
|
||||
/// PORCH cell 0xA9B4017A (the portal's owner cell, pinned by the teleport
|
||||
/// pCell flip)? If not admitted, no pass can draw the swirl regardless of
|
||||
/// the emitter plumbing.</summary>
|
||||
[Fact]
|
||||
public void Diagnostic_LookInFlood_AdmitsHallPorchFromCottage()
|
||||
{
|
||||
var datDir = CornerFloodReplayTests.ResolveDatDir();
|
||||
if (datDir is null) { _out.WriteLine("SKIP: dats unavailable"); return; }
|
||||
using var dats = new DatCollection(datDir, DatAccessType.Read);
|
||||
|
||||
var cells = Issue120ReciprocalPingPongTests.LoadAllInteriorCells(dats, 0xA9B40000u);
|
||||
_out.WriteLine(FormattableString.Invariant($"loaded {cells.Count} A9B4 interior cells; hasPorch017A={cells.ContainsKey(0xA9B4017Au)}"));
|
||||
AcDream.App.Rendering.LoadedCell? Lookup(uint id) => cells.TryGetValue(id, out var c) ? c : null;
|
||||
|
||||
// The captured frame: [viewer] root=0xA9B40171 eye=(155.255,14.533,96.074)
|
||||
// fwd=(0.0702,0.9554,-0.2869) (portal-owner-verdicts.log:135118).
|
||||
var eye = new System.Numerics.Vector3(155.255f, 14.533f, 96.074f);
|
||||
var fwd = new System.Numerics.Vector3(0.0702f, 0.9554f, -0.2869f);
|
||||
var view = System.Numerics.Matrix4x4.CreateLookAt(eye, eye + fwd, System.Numerics.Vector3.UnitZ);
|
||||
var proj = System.Numerics.Matrix4x4.CreatePerspectiveFieldOfView(1.2f, 1280f / 720f, 1f, 5000f);
|
||||
var viewProj = view * proj;
|
||||
|
||||
var root = cells[0xA9B40171u];
|
||||
var pv = AcDream.App.Rendering.PortalVisibilityBuilder.Build(
|
||||
root, eye, Lookup, viewProj,
|
||||
buildingMembership: null,
|
||||
drawLiftZ: AcDream.App.Rendering.PortalVisibilityBuilder.ShellDrawLiftZ);
|
||||
_out.WriteLine(FormattableString.Invariant(
|
||||
$"main flood={pv.OrderedVisibleCells.Count} outPolys={pv.OutsideView.Polygons.Count}"));
|
||||
|
||||
var lookIn = AcDream.App.Rendering.PortalVisibilityBuilder.BuildFromExterior(
|
||||
cells.Values, eye, Lookup, viewProj,
|
||||
float.PositiveInfinity, pv.OutsideView.Polygons);
|
||||
var sb = new System.Text.StringBuilder("look-in admitted:");
|
||||
foreach (uint id in lookIn.OrderedVisibleCells)
|
||||
sb.Append(FormattableString.Invariant($" 0x{id & 0xFFFFu:X4}"));
|
||||
_out.WriteLine(sb.ToString());
|
||||
_out.WriteLine(FormattableString.Invariant(
|
||||
$"porch 0x017A admitted: {lookIn.OrderedVisibleCells.Contains(0xA9B4017Au)}"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Diagnostic_DumpOutstageCandidateSetups()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue