acdream/tests/AcDream.App.Tests/Rendering/Wb
Erik a82959f1b7 fix(render): production packed classifier carries the foliage flags; deferred-alpha replay keeps them (Campaign VM VM6 review 2)
Narrow re-review of 43e3abed found every A1-A5/A7/A8 item resolved but
one new blocker in the production packed classifier.

F1 (BLOCKER): RetailPViewPassExecutor.DrawPackedProductionRoute — the
route production world geometry actually draws from — never computed
FoliageFlags at all. WbDrawDispatcher.PackedOracle.cs's
ClassifyPackedBatches built its GroupKey with the field defaulting to
0u, and GetOrCreatePackedGroup never copied it onto the created
InstanceGroup, so production BatchData.flags bits 1/2 were always zero
for every scenery entity: the world geometry never swayed even though
the independently-classified shadow caster did, so shadows visibly
swayed under rigid trees. Both classifier call sites now compute
FoliageFlags via the identical FoliageWindClassification.Classify call
and entity-scoped HasCutoutSubset OR the classic (non-packed) path
uses, and GetOrCreatePackedGroup copies it exactly like
GetOrCreateInstanceGroup always has. The G2/G3 classified-output
digest (AddOpaqueSubmissionGroup/BuildTransparentSubmissionDigest) now
also folds GroupKey.FoliageFlags into its hash — present in the key
since round 1 but never actually read by either digest function, so a
content-level (not just group-count-level) classic-vs-packed
divergence is now caught.

F2 (medium): the delayed-alpha replay path (PrepareDeferredAlphaDraws)
hardcoded Flags = 1, dropping bits 1/2 for any group replayed through
it — a trunk instance promoted into the alpha-blend group mid-fade
(the #188 translucency-promotion case) would stop swaying for the
duration of its fade. Now 1u | key.FoliageFlags.

F3 (nit): ComputeEntityHasCutoutSubset's three call sites (classic,
caster, and the newly-fixed packed classifier) each allocated a
closure over _meshAdapter per Setup entity per frame. A new
context-taking overload passes the mesh adapter as an explicit
argument to a static lambda instead, letting the compiler cache one
delegate for the method's lifetime rather than allocating fresh ones.

A3 test gap: WbDrawDispatcher.BindDirectionalShadowReceiver is now
internal so DirectionalShadowGpuTests can drive it directly with a
bare RecordingGpuDevice pass encoder, proving it emits
UniformAtmosphericFrame with the exact buffer/offset/size a
DirectionalShadowFrameBinding carries — paired with the existing test
proving that binding carries the caster's real bind forward untouched.

F1's missing test: PackedDispatcherOracleTests chains
FoliageWindClassification.Classify (called with the packed
classifier's exact argument shape) for a real 0x8... scenery entity id
through BuildIndirectArrays — the same shared, already-tested
production step both classic and packed group lists feed into BatchData —
proving the resulting flags word carries bit 0x2. Driving
ClassifyPackedBatches/GetOrCreatePackedGroup directly was not a "cheap
test": both are private instance methods reachable only through the
full RetailPViewPassExecutor route, which needs a real IGpuDevice,
world-pass scope, mesh manager, and compiled pipelines to construct —
no test anywhere in the App test project stands one up.

Nits: F4 corrects foliage_wind.glsl's header comment from "bit 31" to
the top-nibble test; F5 documents at the receiver bind site that the
caster's own AtmosphericFrameBufferBinding has its seven ABI v1
members zero/Identity by construction (only the two v2 wind members
are valid) — safe today because mesh_atmospheric.vert reads that
binding solely for wind displacement, flagged as a footgun for a
future v1-reading addition to that shader; F6 notes in the plan
(rather than fixes) that EntityCacheEntry does not proactively
invalidate when FoliageWindExclusions changes on a pack switch —
harmless with the pack off, self-heals on the entry's next natural
eviction.

foliage_wind.glsl's F4 comment-only change updated the SPIR-V
manifest's source hashes for the five includers (mesh_atmospheric.vert
+ four directional_shadow_world_* casters); the compiled .spv bytes
are byte-identical since comments do not affect bytecode.

Verify: Release build 0 warnings/0 errors. App hermetic-lane filter
6,043/0 failed. Core.Tests 4,695/0 failed. RenderPackValidator 30/30.
Full hermetic-filtered solution: 15,271/0 failed across 15 projects.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-23 02:28:17 +02:00
..
BuildingLoaderTests.cs perf(streaming): cursor publication across frame budgets 2026-07-24 19:10:18 +02:00
BuildingRegistryTests.cs feat(render): Phase A8 RR3 — Building + BuildingRegistry + BuildingLoader 2026-05-27 11:08:43 +02:00
BuildingTests.cs feat(render): Phase A8 RR3 — Building + BuildingRegistry + BuildingLoader 2026-05-27 11:08:43 +02:00
CompositeWarmupEntitySourceTests.cs perf(streaming): scope reveal warmup spatially 2026-07-25 04:39:48 +02:00
ContiguousRangeAllocatorTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
DirectionalShadowPreparedDrawTests.cs fix(render): correct foliage-wind classification, receiver/caster desync, and frame binding (Campaign VM VM6 review) 2026-08-23 01:54:36 +02:00
DirectionalShadowTerrainPreparedDrawTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
EntitySpawnAdapterLifetimeTests.cs refactor(app): key live projections by runtime identity 2026-07-25 21:50:58 +02:00
EnvCellLandblockBuildTests.cs fix(streaming): commit EnvCell landblocks atomically (#214) 2026-07-13 18:45:24 +02:00
EnvCellRendererTests.cs fix(render): detail overlay is fogged after the combine like retail; VM1 review fixes 2026-08-22 22:39:58 +02:00
EnvCellSceneryInstanceTests.cs fix(streaming): commit EnvCell landblocks atomically (#214) 2026-07-13 18:45:24 +02:00
FoliageWindClassificationTests.cs fix(render): correct foliage-wind classification, receiver/caster desync, and frame binding (Campaign VM VM6 review) 2026-08-23 01:54:36 +02:00
GpuRetiredRangeAllocatorTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
InstanceGroupClearTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
LandblockSpawnAdapterReadinessTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
MeshPipelineDeviceSeamTests.cs feat(render): Vulkan campaign V11 step 3 — drop the GL packages and shaders 2026-07-29 02:58:15 +02:00
MeshUploadCachesTests.cs fix(streaming): prepare quiesced destination entities 2026-07-24 20:21:57 +02:00
ModernBatchDataLayoutTests.cs feat(render): Campaign V slice V2a - mesh path texture-index migration 2026-07-27 15:51:26 +02:00
ObjectMeshUploadBudgetTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
ObjectMeshWorkerLifecycleTests.cs fix #225: stabilize render pacing and frame CPU 2026-07-19 06:29:30 +02:00
PackedDispatcherOracleTests.cs fix(render): production packed classifier carries the foliage flags; deferred-alpha replay keeps them (Campaign VM VM6 review 2) 2026-08-23 02:28:17 +02:00
PackedProjectionClassificationCacheTests.cs test(app): put every strict-zero site on the probe (#250) 2026-07-29 03:49:13 +02:00
RetryableResourceReleaseLedgerTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
RhiWorldTextureArrayTests.cs fix(render): Campaign V slice V7 commit 1 - world anisotropy, and the sky's second clock 2026-07-28 19:14:08 +02:00
TextureAtlasCapacityTests.cs feat(render): Vulkan campaign V11 step 3 — drop the GL packages and shaders 2026-07-29 02:58:15 +02:00
TextureAtlasSlotAllocatorTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
WbDrawDispatcherClipSlotTests.cs feat(render): indoor render WORKS — terminating portal flood + every-cell seal + look-in FPS 2026-06-07 10:14:43 +02:00
WbDrawDispatcherCompositeWarmupTests.cs fix(rendering): decouple portal warmup discovery 2026-07-25 04:27:17 +02:00
WbDrawDispatcherIndoorFlagTests.cs fix(lighting): #142 — per-instance sun gate for windowed-building interiors 2026-06-20 12:55:56 +02:00
WbDrawDispatcherTorchGateTests.cs fix(lighting): A7 Fix D round 2 — outdoor objects get NO torches (retail useSunlight gate) (#140) 2026-06-19 23:56:49 +02:00
WbFrustumTests.cs feat(render): Phase A8 Wave 1 — WB scaffolding extraction + stencil low-level method 2026-05-27 14:46:07 +02:00
WbTextureResolutionPolicyTests.cs perf(content): remove exception-driven setup probes 2026-07-24 15:12:21 +02:00
WorldTransformFrameArenaTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00