refactor(render): move root-cell dynamics onto walk turns

This commit is contained in:
Erik 2026-08-31 03:44:32 +02:00
parent f9a80fbc44
commit 474b05e7dc
4 changed files with 54 additions and 29 deletions

View file

@ -269,7 +269,15 @@ public sealed class RenderScenePViewFrameProductTests
0x0100_0000_0000_0022,
RenderProjectionClass.LiveDynamicRoot,
parentCell: lookInCell);
scene.Apply([RenderProjectionDelta.Register(Generation, 1, lookInDynamic)]);
RenderProjectionRecord rootDynamic = Record(
0x0100_0000_0000_0023,
RenderProjectionClass.LiveDynamicRoot,
parentCell: Cell);
scene.Apply(
[
RenderProjectionDelta.Register(Generation, 1, lookInDynamic),
RenderProjectionDelta.Register(Generation, 2, rootDynamic),
]);
PortalVisibilityFrame portal = Portal(Cell);
ClipFrameAssembly clip = FullScreenClip(Cell);
@ -298,6 +306,9 @@ public sealed class RenderScenePViewFrameProductTests
Assert.DoesNotContain(
frame.RouteRanges.ToArray(),
candidate => candidate.Route == RenderFrameCandidateRoute.LookInObject);
Assert.DoesNotContain(
frame.RouteCandidates.ToArray(),
candidate => candidate.Id == rootDynamic.Id);
Assert.NotNull(frame.WalkLookInViews);
Assert.False(frame.WalkLookInViews!.SphereVisibleInLookInTurn(
routeIndex: 0,

View file

@ -262,7 +262,8 @@ public sealed class WalkFrameDriverTests
{
"SKY", "TERRAIN:0", "CLEAR", "SEALS",
"SHELL:00000101", "SHELL:00000100",
"FLUSH:1:CellStatic", "FLUSH:1:CellStatic",
"FLUSH:1:CellStatic", "CELL-PARTICLES:00000101:66",
"FLUSH:1:CellStatic", "CELL-PARTICLES:00000100:65",
},
log);
@ -336,7 +337,8 @@ public sealed class WalkFrameDriverTests
new[]
{
"CLEAR", "SEALS", "SHELL:00000101", "SHELL:00000100",
"FLUSH:1:CellStatic", "FLUSH:1:CellStatic",
"FLUSH:1:CellStatic", "CELL-PARTICLES:00000101:66",
"FLUSH:1:CellStatic", "CELL-PARTICLES:00000100:65",
},
log);