Merge branch 'main' into claude/eloquent-hugle-42119e

# Conflicts:
#	.gitignore
This commit is contained in:
Erik 2026-07-06 00:47:09 +02:00
commit 093cdb6d57
38 changed files with 5852 additions and 216 deletions

View file

@ -146,6 +146,12 @@ public sealed class RetailPViewRenderer
prepareCells = _lookInPrepareScratch;
}
// A7 #176/#177: scope this frame's point-light pool to the cells actually being
// drawn, NOW that the flood has resolved the visible set (retail collects lights
// per-frame over visible_cell_table). Must run before the cell/entity draws below
// that select from LightManager.PointSnapshot.
ctx.RebuildScopedLights?.Invoke(prepareCells);
_envCells.PrepareRenderBatches(
ctx.ViewProjection,
ctx.CameraWorldPosition,
@ -1102,6 +1108,16 @@ public sealed class RetailPViewDrawContext : IRetailPViewCellDrawContext
public Action? DrawUnattachedSceneParticles { get; init; }
public Action<IReadOnlyList<WorldEntity>>? DrawDynamicsParticles { get; init; }
public Action<RetailPViewFrameResult>? EmitDiagnostics { get; init; }
/// <summary>A7 #176/#177: rebuild the point-light snapshot scoped to the cells
/// this frame actually draws — invoked AFTER the portal flood resolves the visible
/// set and BEFORE any cell/entity draw (the faithful port of retail's per-frame
/// light collection: <c>CObjCell::add_*_to_global_lights</c> walked over
/// <c>CEnvCell::visible_cell_table</c>). The argument is every cell drawn this frame
/// (main flood + interior-root look-ins). A cell-less light (viewer fill) is kept
/// regardless. Null-safe: outdoor/no-flood callers leave it unset and keep the
/// legacy full-pool snapshot.</summary>
public Action<IReadOnlySet<uint>>? RebuildScopedLights { get; init; }
}
public sealed class RetailPViewFrameResult