feat(rendering): index incremental scene queries

Maintain packed render worksets as lifecycle deltas arrive and synchronize active animated statics without scanning the resident world. This keeps Slice F non-drawing while preparing exact spatial and feature queries for shadow comparison.

Release: 8,206 passed, 5 skipped.
This commit is contained in:
Erik 2026-07-24 22:12:26 +02:00
parent 58e7c2eb99
commit ff5d86175f
8 changed files with 745 additions and 16 deletions

View file

@ -138,6 +138,8 @@ internal sealed class LiveObjectFrameController : ILiveObjectFramePhase
private readonly EquippedChildRenderController _equippedChildren;
private readonly LiveEffectFrameController _effects;
private readonly ILiveRenderProjectionSink? _renderProjections;
private readonly StaticRenderProjectionJournal? _staticRenderProjections;
private readonly List<WorldEntity> _activeStaticProjectionScratch = [];
public LiveObjectFrameController(
RetailInboundEventDispatcher inboundEvents,
@ -152,7 +154,8 @@ internal sealed class LiveObjectFrameController : ILiveObjectFramePhase
LiveEntityAnimationRuntimeView<LiveEntityAnimationState> animatedEntities,
EquippedChildRenderController equippedChildren,
LiveEffectFrameController effects,
ILiveRenderProjectionSink? renderProjections = null)
ILiveRenderProjectionSink? renderProjections = null,
StaticRenderProjectionJournal? staticRenderProjections = null)
{
_inboundEvents = inboundEvents ?? throw new ArgumentNullException(nameof(inboundEvents));
_localPlayerFrame = localPlayerFrame
@ -172,6 +175,7 @@ internal sealed class LiveObjectFrameController : ILiveObjectFramePhase
?? throw new ArgumentNullException(nameof(equippedChildren));
_effects = effects ?? throw new ArgumentNullException(nameof(effects));
_renderProjections = renderProjections;
_staticRenderProjections = staticRenderProjections;
}
public void Tick(float deltaSeconds) =>
@ -207,6 +211,13 @@ internal sealed class LiveObjectFrameController : ILiveObjectFramePhase
_animationPresenter.Present(schedules);
_equippedChildren.Tick();
_renderProjections?.SynchronizeActiveSources();
if (_staticRenderProjections is not null)
{
_staticAnimations.CopyActiveDatStaticEntitiesTo(
_activeStaticProjectionScratch);
_staticRenderProjections.SynchronizeActiveAnimatedSources(
_activeStaticProjectionScratch);
}
// Retail CPhysicsObj::animate_static_object @ 0x00513DF0 runs
// Script -> Particle -> process_hooks. acdream intentionally retains
// the TS-51 static-order difference here: ProcessHooks precedes the