Separate logical ownership, render publication, and GPU retirement across live entities, landblocks, particles, textures, mesh arenas, portal/UI teardown, and per-frame scratch storage. Add bounded DAT/texture caches, upload budgets, three-frame fence retirement, exact-incarnation appearance reconciliation, frame pacing, and extensive lifetime conformance coverage.\n\nThe seven-destination connected route now cuts peak working/private memory roughly in half, returns Caul to 125-153 FPS locally, and produces no WER or AMD reset.\n\nCo-authored-by: OpenAI Codex <codex@openai.com>
40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using System.Numerics;
|
|
|
|
namespace AcDream.Core.Vfx;
|
|
|
|
/// <summary>
|
|
/// Read-only view of the final pose used by entity-attached effects.
|
|
/// Implementations publish poses on the update/render thread after root motion,
|
|
/// animation, and equipped-child composition have completed.
|
|
/// </summary>
|
|
public interface IEntityEffectPoseSource
|
|
{
|
|
bool TryGetRootPose(uint localEntityId, out Matrix4x4 rootWorld);
|
|
|
|
bool TryGetPartPose(uint localEntityId, int partIndex, out Matrix4x4 partLocal);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional update-thread notification surface for pose registries. Effect
|
|
/// consumers use this to refresh only owners whose final root, part, or cell
|
|
/// pose actually changed instead of polling every retained owner each frame.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Notifications are synchronous and occur after the new pose is published.
|
|
/// Implementations must suppress notifications when a publish is byte-for-byte
|
|
/// equivalent to the current pose. Consumers must not mutate the pose source
|
|
/// from inside the callback.
|
|
/// </remarks>
|
|
public interface IEntityEffectPoseChangeSource
|
|
{
|
|
event Action<uint>? EffectPoseChanged;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional spatial companion for consumers, such as object lights, whose
|
|
/// render registration is scoped to the owner's current AC cell.
|
|
/// </summary>
|
|
public interface IEntityEffectCellSource
|
|
{
|
|
bool TryGetCellId(uint localEntityId, out uint cellId);
|
|
}
|