feat(rendering): pack scene dispatcher inputs
Capture immutable presentation payloads in the render scene, flatten unique entity and mesh-part records into the borrowed frame arena, and compare every routed dispatcher input tuple without changing the production draw source.
This commit is contained in:
parent
720578592b
commit
d8d9897376
13 changed files with 593 additions and 24 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System.Numerics;
|
||||
using AcDream.Core.World;
|
||||
|
||||
namespace AcDream.App.Rendering.Scene;
|
||||
|
||||
|
|
@ -194,6 +195,18 @@ internal readonly record struct RenderSourceMetadata(
|
|||
RenderSceneHash128 AppearanceFingerprint,
|
||||
uint CurrentProjectionFlags = 0);
|
||||
|
||||
/// <summary>
|
||||
/// Borrowed immutable presentation payload captured at a scene publication
|
||||
/// edge. WorldEntity replaces its MeshRefs collection when animated or
|
||||
/// appearance state changes, so retaining this exact collection reference is
|
||||
/// a snapshot rather than a callback into gameplay state. G2 copies it into
|
||||
/// the reusable frame arena before any dispatcher consumer observes it.
|
||||
/// </summary>
|
||||
internal readonly record struct RenderEntityPayload(
|
||||
IReadOnlyList<MeshRef> MeshRefs,
|
||||
PaletteOverride? PaletteOverride,
|
||||
bool IsBuildingShell);
|
||||
|
||||
internal readonly record struct RenderProjectionRecord(
|
||||
RenderProjectionId Id,
|
||||
RenderProjectionClass ProjectionClass,
|
||||
|
|
@ -208,7 +221,8 @@ internal readonly record struct RenderProjectionRecord(
|
|||
RenderDegradeState DegradeState,
|
||||
RenderSortKey SortKey,
|
||||
RenderDirtyMask DirtyMask,
|
||||
RenderSourceMetadata Source = default);
|
||||
RenderSourceMetadata Source = default,
|
||||
RenderEntityPayload EntityPayload = default);
|
||||
|
||||
internal enum RenderProjectionDeltaKind : byte
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue