perf(rendering): retain packed classification

Retain appearance classification per projection while refreshing transforms, clip slots, lights, selection lighting, and group instance payloads each frame. Incomplete resources and active animation remain on the live classification path, and only an exact full packed comparison acknowledges scene dirtiness.
This commit is contained in:
Erik 2026-07-25 02:46:40 +02:00
parent f10dec58ba
commit 54d17eb446
7 changed files with 731 additions and 30 deletions

View file

@ -223,6 +223,7 @@ internal sealed class RenderSceneShadowComparisonController :
private readonly RenderSceneShadowRuntime _shadow;
private readonly CurrentRenderSceneOracle _oracle;
private readonly Action<string>? _log;
private readonly bool _acknowledgeDirty;
private readonly List<RenderProjectionRecord> _sceneRecords = [];
private readonly HashSet<RenderProjectionId> _expectedIds = [];
private ulong _renderFrameSequence;
@ -236,11 +237,13 @@ internal sealed class RenderSceneShadowComparisonController :
public RenderSceneShadowComparisonController(
RenderSceneShadowRuntime shadow,
CurrentRenderSceneOracle oracle,
Action<string>? log = null)
Action<string>? log = null,
bool acknowledgeDirty = true)
{
_shadow = shadow ?? throw new ArgumentNullException(nameof(shadow));
_oracle = oracle ?? throw new ArgumentNullException(nameof(oracle));
_log = log;
_acknowledgeDirty = acknowledgeDirty;
Snapshot = BuildSnapshot();
}
@ -300,7 +303,8 @@ internal sealed class RenderSceneShadowComparisonController :
}
}
_shadow.ClearDirty();
if (_acknowledgeDirty && mismatch is null)
_shadow.ClearDirty();
Snapshot = BuildSnapshot();
}