feat(render) Campaign FW1: FIRST TRACE CONFORMANCE GREEN (foundry-deep)

The replay harness reconstructs the camera from a pose-stamped oracle
frame (Frame quaternion w,x,y,z storage order; +Y forward / +Z up;
landblock-local origin) and drives the ported walk over adapter-built
cells (cell transforms from EnvCell.Position now populated). The
foundry-deep fixture - the pure-interior frame shape - reproduces
retail EXACTLY on every complete frame: DI + DC(ov=0, [cell]) with no
landscape, 39/39. Conventions are now pinned by live retail output; the
remaining nine fixtures need the outdoor world build-out (landscape
blocks, terrain z-slabs, building transforms + active-view clip) and
join the same gate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-08-30 10:23:39 +02:00
parent a6b37c0aac
commit 0f01fb4430
4 changed files with 184 additions and 0 deletions

View file

@ -36,6 +36,11 @@ public sealed class WalkCell
public WalkPolygon[] PortalPolygons = [];
public uint[] StabList = [];
/// <summary>Cell-local → landblock-local (retail <c>CEnvCell.pos</c>;
/// the frame the flood's plane tests and projections run in).</summary>
public Matrix4x4 WorldTransform = Matrix4x4.Identity;
public Matrix4x4 InverseWorldTransform = Matrix4x4.Identity;
// ---- walk state (retail: fields on CEnvCell) ----
public int NumView;
public readonly List<WalkPortalView> PortalViews = new();

View file

@ -58,12 +58,21 @@ public static class WalkWorldDatAdapter
?? new WalkPolygon();
}
Matrix4x4 worldTransform =
Matrix4x4.CreateFromQuaternion(envCell.Position.Orientation)
* Matrix4x4.CreateTranslation(
envCell.Position.Origin.X,
envCell.Position.Origin.Y,
envCell.Position.Origin.Z);
Matrix4x4.Invert(worldTransform, out Matrix4x4 inverse);
return new WalkCell
{
CellId = cellId,
Portals = portals,
PortalPolygons = polygons,
StabList = envCell.VisibleCells.Select(v => lbMask | v).ToArray(),
WorldTransform = worldTransform,
InverseWorldTransform = inverse,
};
}