feat(rendering): establish current-path scene referee

Capture deterministic, landblock-aware fingerprints from the accepted partition only during lifecycle automation. This gives the F/G shadow scene an independent oracle without changing normal draw decisions or adding disabled-path per-entity cost.
This commit is contained in:
Erik 2026-07-24 21:13:11 +02:00
parent 5ecaa5612d
commit b2b67341ac
9 changed files with 845 additions and 5 deletions

View file

@ -1,6 +1,7 @@
using System.Text.Json;
using AcDream.App.Rendering;
using AcDream.App.Rendering.Residency;
using AcDream.App.Rendering.Scene;
using AcDream.App.Streaming;
using AcDream.App.UI.Testing;
@ -38,6 +39,7 @@ internal sealed record WorldLifecycleResourceSnapshot(
int TotalLandblocks,
int LiveEntities,
int MaterializedLiveEntities,
CurrentRenderSceneOracleSnapshot RenderSceneOracle,
int PendingLiveTeardowns,
int PendingLandblockRetirements,
int ParticleEmitters,

View file

@ -1,4 +1,5 @@
using AcDream.App.Rendering;
using AcDream.App.Rendering.Scene;
using AcDream.App.Rendering.Vfx;
using AcDream.App.Rendering.Wb;
using AcDream.App.Rendering.Residency;
@ -38,6 +39,8 @@ internal sealed class WorldLifecycleResourceSnapshotSource
private readonly FrameProfiler _frameProfiler;
private readonly IDatReaderWriter _dats;
private readonly ResidencyManager _residency;
private readonly ICurrentRenderSceneOracleSnapshotSource?
_renderSceneOracle;
public WorldLifecycleResourceSnapshotSource(
GpuWorldState world,
@ -55,7 +58,8 @@ internal sealed class WorldLifecycleResourceSnapshotSource
WbDrawDispatcher dispatcher,
FrameProfiler frameProfiler,
IDatReaderWriter dats,
ResidencyManager residency)
ResidencyManager residency,
ICurrentRenderSceneOracleSnapshotSource? renderSceneOracle = null)
{
_world = world ?? throw new ArgumentNullException(nameof(world));
_animations = animations
@ -82,6 +86,7 @@ internal sealed class WorldLifecycleResourceSnapshotSource
_dats = dats ?? throw new ArgumentNullException(nameof(dats));
_residency = residency
?? throw new ArgumentNullException(nameof(residency));
_renderSceneOracle = renderSceneOracle;
}
public WorldLifecycleResourceSnapshot Capture(RenderFrameOutcome outcome)
@ -122,6 +127,8 @@ internal sealed class WorldLifecycleResourceSnapshotSource
TotalLandblocks: outcome.World.TotalLandblocks,
LiveEntities: _liveEntities.Count,
MaterializedLiveEntities: _liveEntities.MaterializedCount,
RenderSceneOracle: _renderSceneOracle?.Snapshot
?? CurrentRenderSceneOracleSnapshot.Disabled,
PendingLiveTeardowns: _liveEntities.PendingTeardownCount,
PendingLandblockRetirements: _streaming.PendingRetirementCount,
ParticleEmitters: _particles.ActiveEmitterCount,