fix(rendering): preserve exact scene traversal order
This commit is contained in:
parent
06e7754619
commit
e0f36caa70
12 changed files with 500 additions and 77 deletions
|
|
@ -0,0 +1,21 @@
|
|||
using AcDream.App.Streaming;
|
||||
using AcDream.Core.World;
|
||||
|
||||
namespace AcDream.App.Rendering.Scene;
|
||||
|
||||
/// <summary>
|
||||
/// Narrow derived adapter over <see cref="GpuWorldState"/>'s canonical spatial
|
||||
/// traversal. It exposes no bucket mutation or gameplay lookup to the render
|
||||
/// scene.
|
||||
/// </summary>
|
||||
internal sealed class GpuWorldRenderTraversalOrderSource(
|
||||
GpuWorldState world) : IRenderTraversalOrderSource
|
||||
{
|
||||
private readonly GpuWorldState _world =
|
||||
world ?? throw new ArgumentNullException(nameof(world));
|
||||
|
||||
public bool TryGetTraversalSortKey(
|
||||
WorldEntity entity,
|
||||
out RenderSortKey sortKey) =>
|
||||
_world.TryGetRenderTraversalSortKey(entity, out sortKey);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue