fix(rendering): preserve exact scene traversal order

This commit is contained in:
Erik 2026-07-25 02:03:58 +02:00
parent 06e7754619
commit e0f36caa70
12 changed files with 500 additions and 77 deletions

View file

@ -92,17 +92,22 @@ internal sealed class RenderSceneShadowRuntime : IDisposable
internal RenderSceneQuery Query => _scene.OpenQuery();
public LiveRenderProjectionJournal BindLiveRuntime(
LiveEntityRuntime runtime)
LiveEntityRuntime runtime,
IRenderTraversalOrderSource traversalOrder)
{
ObjectDisposedException.ThrowIf(_disposed, this);
ArgumentNullException.ThrowIfNull(runtime);
ArgumentNullException.ThrowIfNull(traversalOrder);
if (_live is not null)
{
throw new InvalidOperationException(
"The shadow render scene is already bound to a live runtime.");
}
_live = new LiveRenderProjectionJournal(runtime, _journal);
_live = new LiveRenderProjectionJournal(
runtime,
_journal,
traversalOrder);
return _live;
}