feat(overhaul): select pack shadows from retail visibility
Borrow the exact prior-completed landscape visibility transaction and S2 CELLARRAY owner for the opt-in IA-24 directional-shadow pack. Select terrain by authored 1..64 cells, ordinary casters by CELLARRAY, and buildings by outdoor EffectCellId with no fallback. Keep retained caster/material/terrain topology stable across visibility-only frames. Publish exact arbitrary active instance runs and bounded terrain commands through separate selection sequences; preserve transform-journal, fade/retry, deferral, shader/RHI, ordinary world, and pack-off behavior. Amend IA-24 and the S5 ledger. Pre-commit gates: Release solution build 0 warnings/0 errors; focused visibility/frame/caster/prepared/GPU/terrain/pack lane 137/137; warmed caster/prepared/terrain selectors 0 B; git diff --check clean. Official hermetic and InstalledDat evidence intentionally run post-commit from this exact clean tree. Mutation evidence (each restored exactly): (1) CELLARRAY->Parent first failed PriorLandscapeSelection expected [201,202,203,205], actual [204,205]. (2) all resident terrain first failed Assert.Single with 3 commands. (3) building EffectCell->anchor first failed expected trailing 205, actual 206. (4) admit missing membership first failed with extra 204. (5) completed->building scratch first failed completed-view Assert.True, expected true/actual false. (6) selection advanced BuildSequence first failed expected 1/actual 2. (7) alternating->prefix first failed active command count expected 3/actual 1. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
5c106bcdff
commit
a4de2efc4e
19 changed files with 1198 additions and 100 deletions
|
|
@ -1463,6 +1463,63 @@ public sealed class AtmosphericPostProcessGraphTests
|
|||
Assert.Equal(first.WindAmplitude, second.WindAmplitude);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void BuiltInAndDeclaredShadowGraphsUseTheSameTypedPriorVisibilitySelector()
|
||||
{
|
||||
string renderingRoot = Path.Combine(
|
||||
RepositoryRoot(),
|
||||
"src",
|
||||
"AcDream.App",
|
||||
"Rendering",
|
||||
"Packs");
|
||||
string builtIn = File.ReadAllText(
|
||||
Path.Combine(renderingRoot, "AtmosphericPostProcessGraph.cs"));
|
||||
string declared = File.ReadAllText(
|
||||
Path.Combine(renderingRoot, "DeclaredFullscreenRenderPackGraph.cs"));
|
||||
|
||||
AssertGraphUsesTypedSelection(builtIn, "RenderDirectionalShadows(");
|
||||
AssertGraphUsesTypedSelection(declared, "RenderDeclaredDirectionalShadows(");
|
||||
|
||||
string register = File.ReadAllText(Path.Combine(
|
||||
RepositoryRoot(),
|
||||
"docs",
|
||||
"architecture",
|
||||
"retail-divergence-register.md"));
|
||||
string ia24 = Assert.Single(register.Split('\n'), static line =>
|
||||
line.StartsWith("| IA-24 |", StringComparison.Ordinal));
|
||||
Assert.Contains("prior successfully completed", ia24,
|
||||
StringComparison.Ordinal);
|
||||
Assert.Contains("S2's retained retail CELLARRAY", ia24,
|
||||
StringComparison.Ordinal);
|
||||
Assert.Contains("building shells by their outdoor placement `EffectCellId`", ia24,
|
||||
StringComparison.Ordinal);
|
||||
Assert.Contains("pack-off does not build, select, upload, or draw shadow work", ia24,
|
||||
StringComparison.Ordinal);
|
||||
|
||||
static void AssertGraphUsesTypedSelection(string source, string methodName)
|
||||
{
|
||||
int start = source.IndexOf(methodName, StringComparison.Ordinal);
|
||||
Assert.True(start >= 0, $"missing {methodName}");
|
||||
int end = source.IndexOf("public IGpuRenderTarget PrepareWorldTarget", start,
|
||||
StringComparison.Ordinal);
|
||||
Assert.True(end > start, $"could not bound {methodName}");
|
||||
string method = source[start..end];
|
||||
Assert.Contains(
|
||||
"RetailLandscapeVisibilityFrame priorLandscapeVisibility =",
|
||||
method,
|
||||
StringComparison.Ordinal);
|
||||
Assert.Contains("world.PriorLandscapeVisibility", method,
|
||||
StringComparison.Ordinal);
|
||||
Assert.Contains("_shadowCasters.Select(", method, StringComparison.Ordinal);
|
||||
Assert.Contains("world.DirectionalShadowCellMembership", method,
|
||||
StringComparison.Ordinal);
|
||||
Assert.Contains("EmptyDirectionalShadowCellMembership.Instance", method,
|
||||
StringComparison.Ordinal);
|
||||
Assert.Contains("PriorLandscapeVisibility: world.PriorLandscapeVisibility", method,
|
||||
StringComparison.Ordinal);
|
||||
}
|
||||
}
|
||||
|
||||
private static AtmosphericFrameUniforms RenderAndReadFrameBlock(
|
||||
RecordingGpuDevice device,
|
||||
AtmosphericPostProcessGraph graph,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue