acdream/tests
Erik 388457a735 fix(render): interior shell and detail passes bind their own instance opacity (Campaign VM VM1)
EnvCellRenderer.Rhi's SubmitRhi bound StorageInstances/StorageBatches/
StorageClipSlots/StorageGlobalLights/StorageInstanceLightSets every frame
but never GpuBindingModel.StorageInstanceAlpha (binding 7) — the SSBO
mesh_modern.vert reads as instanceAlpha[instanceIndex] (vOpacityMultiplier,
#188) and, as of Campaign VM VM1 (05970306), mesh_detail.vert now reads the
same way (vDetailOpacity). Without a bind of its own, both the interior
shell pass and the interior detail replay read whatever section
WbDrawDispatcher's own SubmitRhi last bound in the same pass — an unrelated
object's opacity array, indexed by these EnvCell instance ids.

This predates VM1 (6c79d35c has the same omission on the mesh_modern side);
VM1 must not widen a latent defect by adding a second unconditional reader
of the same unbound slot.

Fix, root cause, no guard: EnvCellRenderer now owns _instanceAlphaData, a
grow-only float[] parallel to _gpuInstanceTransforms (same pattern as
_clipSlotData/_lightSetData), filled with the constant 1.0f every frame —
EnvCell shells have no #188 TransparentPartHook translucency fade (that
mechanism fades object PARTS, never cells) — and bound at
GpuBindingModel.StorageInstanceAlpha alongside the renderer's other
per-frame ring sections, before any draw in the pass.

Test: EnvCellRendererTests.SubmitRhi_BindsConstantOneInstanceAlphaBeforeAnyDrawInThePass
drives SubmitRhi directly (reflection, mirroring the file's existing
private-method test pattern) with N seeded cell instances and one real
draw command, then asserts against RecordingGpuDevice that
StorageInstanceAlpha is bound with exactly N floats all equal to 1.0f, and
that the bind precedes the pass's first MultiDrawIndexedIndirect call.
Verified failing (StorageInstanceAlpha was never bound) with the fix
temporarily reverted, then passing restored.

Verified: dotnet build AcDream.slnx -c Release (0 warnings, 0 errors);
dotnet test on AcDream.App.Tests (Release, hermetic lanes) green,
5960/5960 (5959 baseline + 1 new test).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-22 22:13:33 +02:00
..
AcDream.App.Tests fix(render): interior shell and detail passes bind their own instance opacity (Campaign VM VM1) 2026-08-22 22:13:33 +02:00
AcDream.Bake.Tests test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
AcDream.Cli.Tests build: make release restore reproducible 2026-08-18 10:29:00 +02:00
AcDream.Content.Tests feat(quest): QT2/QT4 — the contract catalog, and retail's progress column 2026-08-21 14:53:21 +02:00
AcDream.Core.Net.Tests fix(journal): the location readout is a FIELD, refresh at the click, and Abandon works 2026-08-21 16:19:18 +02:00
AcDream.Core.Tests feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Core.Tests.Fixtures.HelloPlugin feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Headless.Tests feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Launcher.Core.Tests feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Launcher.Core.Tests.Fixtures.ConsolelessSupervisorParent build: make release restore reproducible 2026-08-18 10:29:00 +02:00
AcDream.Launcher.Core.Tests.Fixtures.ConsoleSignalChild build: make release restore reproducible 2026-08-18 10:29:00 +02:00
AcDream.Launcher.Core.Tests.Fixtures.InstallLeaseHolder feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Launcher.Tests feat(launcher): LU8 — logging in IS the character refresh; put Play above the fold 2026-08-19 20:48:15 +02:00
AcDream.Platform.Tests feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Plugin.Tests.Fixtures.HostPlugin feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Plugin.Tests.Fixtures.InvalidRenderPackInternal feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Plugin.Tests.Fixtures.InvalidRenderPackMultiple feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Plugins.MossTank.Tests feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.RenderPackValidator.Tests feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Runtime.Tests feat(journal): QJ1/QJ2 — the journal's pages and their file 2026-08-21 15:31:47 +02:00
AcDream.UI.Abstractions.Tests feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
Fixtures/campaign-la feat(plugins): enforce apiVersion; launcher plugins default ON with "none" opt-out 2026-08-20 21:28:04 +02:00
Directory.Build.props fix: retail text and golden-string tests must not follow the machine's locale 2026-08-19 19:56:09 +02:00
TestCultureInitializer.cs fix: retail text and golden-string tests must not follow the machine's locale 2026-08-19 19:56:09 +02:00