acdream/tests/AcDream.App.Tests/Rendering
Erik 059703066f fix(render): #226 detail overlay uses retail's single-pass combine; drop the dead distance fade (Campaign VM VM1)
VM2's live cdb read against the PDB-paired retail client (GUID
9e847e2f-777c-4bd9-886c-22256bb87f32) proved
m_caps.bCanDoSinglePassDetailing = 1 and trysinglepass = 1 on real hardware,
so D3DPolyRender::RenderMeshSubset (0x0059ca10) never falls back to the
two-pass framebuffer blend the earlier #226 port reproduced. Every loaded
CGfxObj sets use_built_mesh = 1 (CGfxObj::InitLoad 0x005346b0), so buildings
and EnvCells always take the single-pass texture-stage combine set up in
D3DPolyRender::SetSurface (0x0059c4d0):

    result = lerp(base * diffuse, detail.rgb, detail.a * diffuse.a)

RenderMeshSubset lights opaque built-mesh subsets with
tmpmaterial.Diffuse.a = 1, so on the live Dereth category texture
0x06006D58 (mean rgb 0.165, mean alpha 0.132) the combine works out to
~0.868 * base + 0.022 — a mild darkening, the opposite sign of the fallback
DstColor blend's brightening.

Also removes the invented 10 m / 50 m distance fade. Retail's
ACRender::get_alpha_for_z (0x006b6230) is only evaluated in
D3DPolyRender::DrawPolyInternal (0x0059d7c0, the immediate-polygon path)
and only when the static noFadeDetail (0x00820e38, initialised to 1) is 0 —
unreachable for built meshes. Attenuation is the sampler's linear mip chain
converging to the texture mean, not a scripted ramp.

Changes:
- mesh_detail.vert/.frag: drop vDetailFade and its distance term; add
  vDetailOpacity mirroring mesh_modern.vert's InstanceAlphaBuf (binding 7)
  read, and output detail.rgb with alpha = detail.a * vDetailOpacity under
  the corrected pipeline blend.
- VulkanViewportMapping.BlendFactorsOf / GpuEnums.GpuBlendMode.RetailDetail:
  SrcAlpha + OneMinusSrcAlpha instead of DstColor + OneMinusSrcAlpha.
- RetailDetailTextureContract: replaced the distance-fade constants and
  FramebufferFactor with Expected(base, detail, opacity) and IsNeutral,
  matching the lerp; contract tests cover zero-alpha/zero-opacity no-ops,
  the measured darkening on the live category texture, and full-alpha
  replacement.
- Regenerated mesh_detail's committed SPIR-V and the shader manifest
  (tools/compile-shaders.ps1); no other shader pair changed.
- Docs: #226's pseudocode note, the docs/ISSUES.md #226 entry, and the
  retired TS-52 divergence-register row corrected from the two-pass
  DESTCOLOR description to the single-pass path and the darkening
  expectation, each citing the VM2 cdb note.

Verified: dotnet build AcDream.slnx -c Release (0 warnings, 0 errors);
dotnet test on AcDream.App.Tests and AcDream.Core.Tests (Release, hermetic
lanes) both green.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-22 21:58:48 +02:00
..
Gpu fix(render): #226 detail overlay uses retail's single-pass combine; drop the dead distance fade (Campaign VM VM1) 2026-08-22 21:58:48 +02:00
Packs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
Residency feat(diagnostics): complete residency pressure ledger 2026-07-24 16:40:17 +02:00
Vfx feat(audio): Campaign A slice A3 — the server sound channel (0xF750) 2026-08-08 22:07:23 +02:00
Wb feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
ArchRenderSceneTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AttachmentUpdateOrderTests.cs refactor(app): key live projections by runtime identity 2026-07-25 21:50:58 +02:00
BoundedUnownedResourceCacheTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
BuildingGroupScratchTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
CameraCollisionIndoorTests.cs T6 (BR-7) C3: per-cell shadow architecture - flood registration, building channel, per-cell query; b3ce505 stopgap DELETED (closes #99) 2026-06-11 14:37:50 +02:00
CameraCollisionUpdateViewerTests.cs fix(physics): validate retail cell containment roots 2026-07-31 14:48:26 +02:00
CameraControllerTests.cs fix #414: cursor disappears at character select after the in-world logoff 2026-08-17 15:17:50 +02:00
CameraDiagnosticsCollection.cs test(app): serialize the classes sharing camera/render process globals (#252) 2026-07-28 18:46:43 +02:00
CameraFrameControllerTests.cs refactor(physics): delete legacy PhysicsEngine.Resolve/ResolvePlacement/HasCellSurface (C5a, AP-1/AD-1) 2026-08-05 14:11:31 +02:00
CellViewDedupTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
CellVisibilityCommitTests.cs fix(streaming): commit EnvCell landblocks atomically (#214) 2026-07-13 18:45:24 +02:00
CellVisibilityFromRootTests.cs refactor(render): Stage 3 T3.1 — delete FindCameraCell AABB grace-frame fallback 2026-06-02 15:36:47 +02:00
CellVisibilityPortalPolygonsTests.cs fix(streaming): commit EnvCell landblocks atomically (#214) 2026-07-13 18:45:24 +02:00
ChargenPreviewAnimatorTests.cs feat(chargen): Campaign CC slice CC6b-PRE — idle loop, rotation, zoom (mount-independent half) 2026-08-15 19:05:56 +02:00
ChargenPreviewCameraTests.cs feat(chargen): Campaign CC slice CC6a — index→ObjDesc factory + preview renderer foundation 2026-08-15 17:22:06 +02:00
ChargenPreviewControllerTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
ChargenPreviewEntityBuilderTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
ChargenPreviewRotationControllerTests.cs feat(chargen): Campaign CC slice CC6b-MOUNT — Appearance page + preview mount 2026-08-15 21:00:10 +02:00
ChargenPreviewZoomControllerTests.cs fix(chargen): Campaign CC CC6b-PRE review fix round — F1-F7 + F11 concession rewrite 2026-08-15 19:32:48 +02:00
ClipFrameAssemblerTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
ClipFrameLayoutTests.cs feat(render): Vulkan campaign V11 step 2 — delete the OpenGL backend 2026-07-29 02:19:53 +02:00
ClipPlaneSetTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
CompositeTextureArrayCachePolicyTests.cs feat(render): Campaign V slice V4t-2 — the world texture stack crosses to GpuTextureSlot 2026-07-28 12:43:50 +02:00
CornerFloodReplayTests.cs test: finish diagnostic classification 2026-08-18 13:41:17 +02:00
CreatureAppraisalPresentationTests.cs feat(ui): port retail creature appraisal presentation 2026-07-23 12:55:24 +02:00
CurrentRenderSceneOracleTests.cs test(app): put every strict-zero site on the probe (#250) 2026-07-29 03:49:13 +02:00
DebugVmRenderFactsPublisherTests.cs refactor(render): extract frame presentation diagnostics 2026-07-22 05:02:31 +02:00
DevToolsRuntimeSourcesTests.cs refactor(app): compose session and player startup 2026-07-22 18:28:32 +02:00
DirectionalShadowCascadeFitterTests.cs Fix ambient flyer cadence and rotating shadows 2026-08-22 17:39:38 +02:00
DirectionalShadowCasterFrameTests.cs test(render): fully warm dense shadow allocation gate 2026-08-22 14:10:53 +02:00
DirectionalShadowEnvironmentGateTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
DirectionalShadowGpuTests.cs Fix ambient flyer cadence and rotating shadows 2026-08-22 17:39:38 +02:00
DirectionalShadowQualityTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
DirectionalShadowReceiverTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
DirectionalShadowTransformBufferSetTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
DisplayFramePacingControllerTests.cs fix(rendering): survive display topology handoff 2026-07-25 13:15:24 +02:00
DisplayModeCatalogTests.cs fix #407: windowed resolution offering decoupled from the video-mode list 2026-08-16 09:03:36 +02:00
DollCameraTests.cs fix(D.2b): Slice 2 — retail-exact doll pose, camera + heading (visual gate) 2026-06-25 13:16:27 +02:00
DollEntityBuilderTests.cs feat(D.2b): Slice 2 — DollEntityBuilder (player Setup+ObjDesc -> doll WorldEntity) 2026-06-23 09:07:02 +02:00
DynamicBufferCapacityTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
EntityClipTests.cs fix(render): R1 — repurpose the ParentCellId==null cell-gate bypass (#78) 2026-06-02 20:10:26 +02:00
EntityPhysicsHostTests.cs refactor(world): canonicalize live physics host ownership 2026-07-21 14:05:34 +02:00
EquippedChildProjectionWithdrawalTests.cs fix(physics): bind a parented child to the parent's live incarnation (#319) 2026-08-05 11:56:31 +02:00
FixedEntityTextureOwnerLeaseTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
FramebufferResizeControllerTests.cs fix: retail text and golden-string tests must not follow the machine's locale 2026-08-19 19:56:09 +02:00
FramePacingControllerTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
FramePacingPolicyTests.cs fix #225: stabilize render pacing and frame CPU 2026-07-19 06:29:30 +02:00
GameWindowCrashStatusTests.cs test: replace runtime root source freezes 2026-08-18 16:02:15 +02:00
GameWindowHostBoundaryTests.cs test: replace graphical host source freezes 2026-08-18 16:30:25 +02:00
GameWindowLifetimeTests.cs fix(app): #343 — a wounded render loop defers the native release instead of throwing over the real failure 2026-08-07 10:28:29 +02:00
GameWindowRenderLeafCompositionTests.cs test: replace render leaf source freezes 2026-08-18 16:12:50 +02:00
GameWindowStartupOptionsTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
GpuFrameFlightControllerTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
GpuResourceRetirementTransactionTests.cs feat(render): Vulkan campaign V11 step 2 — delete the OpenGL backend 2026-07-29 02:19:53 +02:00
GpuRetiredTerrainSlotAllocatorTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
HostQuiescenceGateTests.cs test: observe monitor waits without delays 2026-08-18 12:56:25 +02:00
HouseExitWalkReplayTests.cs test: finish diagnostic classification 2026-08-18 13:41:17 +02:00
IndoorDrawPlanTests.cs feat(render): IndoorDrawPlan.ShellPass — every visible cell, no drawable filter (R1) 2026-06-06 21:59:26 +02:00
InteriorEntityPartitionTests.cs T1 (fused BR-2/3): retail frame order - dynamics last, punch+seal, shell chop deleted 2026-06-11 11:16:27 +02:00
Issue95DungeonFloodDiagnosticTests.cs test: finish diagnostic classification 2026-08-18 13:41:17 +02:00
Issue113DrawingBspFilterTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
Issue113MeetingHallFloodTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
Issue120ReciprocalPingPongTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
Issue124LookInSeedRegionTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
Issue127FloodFlipReplayTests.cs ci: tag DAT-dependent tests into the InstalledDat lane; drop invariant workaround 2026-08-19 11:19:14 +02:00
Issue129PunchBiasTests.cs fix #129: cap the punch mark bias's eye-space reach (was unbounded at distance) 2026-06-12 13:38:59 +02:00
Issue130DoorwayStripTests.cs test: finish diagnostic classification 2026-08-18 13:41:17 +02:00
Issue131SetupProbeTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
Issue177StairDescentCameraFloodTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
Issue181CameraParkStabilityTests.cs test(app): serialize the classes sharing camera/render process globals (#252) 2026-07-28 18:46:43 +02:00
Issue181VisFlapReplayTests.cs test: finish diagnostic classification 2026-08-18 13:41:17 +02:00
Issue181WallPressEquilibriumTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
Issue176177FacilityHubFloodReplayTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
LinuxMonotonicFramePacingWaiterTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
LinuxPlatformBoundaryTests.cs fix(launcher): close Campaign LA LA1 review findings 2026-08-14 17:00:09 +02:00
LiveAppearanceAnimationTests.cs refactor(physics): hoist the live-entity collision builder to Runtime (#330 groundwork) 2026-08-07 01:49:13 +02:00
LiveEntityAnimationPresenterTests.cs refactor(runtime): own canonical entity and object lifetime 2026-07-26 05:54:46 +02:00
LiveEntityAnimationSchedulerTests.cs test(vfx): model the post-f24532ad effect cell and canonical body frame 2026-08-03 13:32:46 +02:00
LiveEntityCreateSupersessionRecoveryTests.cs test: replace create authority source pin 2026-08-18 16:52:22 +02:00
LiveRenderProjectionJournalTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
NdcScissorRectTests.cs fix #130: doorway-slice scissor cut the aperture's top/right pixel row 2026-06-12 13:31:43 +02:00
OrderedResourceTeardownTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
OutdoorCellNodeTests.cs feat(render): R-A2 — per-building floods (the flap fix) 2026-06-08 18:44:43 +02:00
OwnerScopedResourceRegistryTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
PaperdollFramePresenterTests.cs fix(streaming): preserve portal destination ownership 2026-07-25 08:35:12 +02:00
ParticleBindlessInstanceTests.cs feat(render): Vulkan campaign V11 step 3 — drop the GL packages and shaders 2026-07-29 02:58:15 +02:00
ParticleEmitterRetirementTrackerTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
PhysicsCameraCollisionProbeTests.cs feat(A): wire SweepEye to the verbatim update_viewer (start-cell + fallbacks) 2026-06-05 11:10:32 +02:00
PortalProjectionTests.cs test: stabilize load-sensitive release contracts 2026-08-18 11:50:23 +02:00
PortalTunnelAssetTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
PortalViewTests.cs feat(render): Phase A8.F — ViewPolygon + CellView clip-region data model 2026-05-29 11:30:28 +02:00
PortalVisibilityBuilderTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
PortalVisibilityRobustnessTests.cs feat(render): R-A2 — per-building floods (the flap fix) 2026-06-08 18:44:43 +02:00
PrivateEntityViewportRendererDrawOrderTests.cs fix(chargen): Campaign CC gate round 1 Batch D — gmCG3DView environment backdrop 2026-08-16 13:05:23 +02:00
PrivatePresentationRendererTests.cs feat(render): Campaign V slice V11 commit 1 - delete ImGui, Studio, and the DevTools frontend 2026-07-28 23:56:04 +02:00
RendererResourceDisposalLedgerTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
RenderFrameDiagnosticsControllerTests.cs perf(diagnostics): expose prepared asset source counters 2026-07-24 15:16:32 +02:00
RenderFrameOrchestratorTests.cs perf(diag): complete trustworthy Slice A capture tooling 2026-07-24 12:46:51 +02:00
RenderFramePreparationControllerTests.cs refactor(render): compose render frame orchestrator 2026-07-22 08:03:49 +02:00
RenderFrameProductTests.cs test(app): measure the warmed path, not the path being warmed (#250) 2026-07-29 03:42:08 +02:00
RenderFrameRecoveryIntegrationTests.cs perf(diag): complete trustworthy Slice A capture tooling 2026-07-24 12:46:51 +02:00
RenderFrameResourceControllerTests.cs test: replace frame orchestration source freezes 2026-08-18 16:40:56 +02:00
RenderFrameRouteOwnerSelectorTests.cs test(app): put every strict-zero site on the probe (#250) 2026-07-29 03:49:13 +02:00
RenderInstanceCandidateTests.cs refactor(rendering): isolate dispatcher candidate values 2026-07-25 01:06:57 +02:00
RenderSceneArchitectureTests.cs feat(rendering): contain incremental render scene 2026-07-24 21:42:42 +02:00
RenderScenePViewFrameProductTests.cs Reapply "perf(rendering): draw retained frame product" 2026-07-25 08:36:11 +02:00
RenderSceneShadowRuntimeTests.cs perf(rendering): retain packed classification 2026-07-25 02:46:40 +02:00
ResourceCleanupGroupTests.cs test: replace render source freezes 2026-08-18 14:58:25 +02:00
ResourceShutdownTransactionTests.cs refactor(app): extract focused window lifetime 2026-07-22 19:43:52 +02:00
RetailAlphaQueueTests.cs perf(render): bound animation and alpha scratch residency 2026-07-24 16:34:28 +02:00
RetailChaseCameraTests.cs test(app): serialize the classes sharing camera/render process globals (#252) 2026-07-28 18:46:43 +02:00
RetailDetailTextureContractTests.cs fix(render): #226 detail overlay uses retail's single-pass combine; drop the dead distance fade (Campaign VM VM1) 2026-08-22 21:58:48 +02:00
RetailFieldOfViewTests.cs fix #389 review round: settings v3 FOV migration + live apply; AD-90 2026-08-13 17:27:15 +02:00
RetailParticleGeometryClassifierTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
RetailPViewPassExecutorTests.cs test: replace render source freezes 2026-08-18 14:58:25 +02:00
RetailSelectionAssetTests.cs test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
RetailSelectionLightingPulseTests.cs fix(interaction): bind selection to live incarnations 2026-07-21 07:07:58 +02:00
RetailSelectionSceneTests.cs fix(rendering): isolate world selection transactions 2026-07-24 22:31:15 +02:00
RetailStaticAnimatingObjectSchedulerTests.cs Fix ambient flyer cadence and rotating shadows 2026-08-22 17:39:38 +02:00
RhiCompositeTextureArrayBackendTests.cs feat(render): Campaign V slice V6i-2 commit 2 — world texture creation crosses to IGpuTexture 2026-07-28 13:57:43 +02:00
RhiVertexLayoutStrideTests.cs feat(render): Campaign V slice V6l commit 1 - particles draw on Vulkan 2026-07-28 17:20:59 +02:00
RollingTimingSampleWindowTests.cs refactor(render): extract frame presentation diagnostics 2026-07-22 05:02:31 +02:00
RuntimeResourceSlotTests.cs fix: retail text and golden-string tests must not follow the machine's locale 2026-08-19 19:56:09 +02:00
ScreenPolygonClipTests.cs feat(render): Phase A8.F — ScreenPolygonClip 2D convex-polygon intersection 2026-05-29 11:37:30 +02:00
SilkWindowCallbackBindingTests.cs test: observe monitor waits without delays 2026-08-18 12:56:25 +02:00
SkyParamsLayoutTests.cs feat(render): V6e — the sky's uniforms become a buffer and its texture a table slot 2026-07-28 09:54:13 +02:00
SkyProjectionTests.cs fix(runtime): align portal and movement presentation 2026-07-17 08:48:27 +02:00
SkyVertexLayoutTests.cs feat(render): Campaign V slice V6k commit 1 - the sky draws on Vulkan 2026-07-28 16:31:37 +02:00
SpawnMotionInitializerTests.cs fix(animation): preserve wire motion on every spawn path 2026-07-12 14:27:44 +02:00
StandaloneBindlessTextureCacheTests.cs feat(render): Campaign V slice V4t-2 — the world texture stack crosses to GpuTextureSlot 2026-07-28 12:43:50 +02:00
StaticAnimatingOmegaHookTests.cs fix(world): honour SetOmega — the birds and butterflies fly again 2026-08-21 05:42:59 +02:00
StaticRenderProjectionJournalTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
SyntheticEntityMeshReferenceOwnerTests.cs fix(streaming): preserve portal destination ownership 2026-07-25 08:35:12 +02:00
TerrainCullOrientationTests.cs fix #108-residual (root cause): terrain drew DOUBLE-SIDED - port retail landPolysDraw eye-side gate as terrain backface cull 2026-06-12 22:05:31 +02:00
TerrainDrawDiagnosticsControllerTests.cs refactor(render): extract typed retail pview passes 2026-07-22 06:40:09 +02:00
TerrainParticleCellVisibilityTests.cs perf(vfx): port retail particle visibility degradation 2026-07-17 15:27:36 +02:00
TerrainTextureTilingTableTests.cs feat(render): Campaign V slice V6f-2 - terrain's tiling table becomes a buffer 2026-07-28 10:11:00 +02:00
TextRendererLinearTwinTests.cs fix(ui): Campaign LA gate round 2 — fixed-canvas stretch filters bilinearly like retail's presentation blit 2026-08-15 11:05:59 +02:00
TextureCacheLinearTwinTests.cs fix(ui): Campaign LA gate round 2 — fixed-canvas stretch filters bilinearly like retail's presentation blit 2026-08-15 11:05:59 +02:00
TowerAscentReplayTests.cs test: separate non-hermetic release lanes 2026-08-18 10:49:22 +02:00
ViewconeCullerReuseTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
VolumetricShaftQualityTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
WindowIconLoaderTests.cs fix(app): apply the window icon from Load, not beside Window.Create 2026-08-20 15:13:29 +02:00
WorldRenderDiagnosticsTests.cs feat(render): Vulkan campaign V11 step 3 — drop the GL packages and shaders 2026-07-29 02:58:15 +02:00
WorldRenderFrameBuilderTests.cs test: replace render source freezes 2026-08-18 14:58:25 +02:00
WorldRevealRenderResourceSchedulerTests.cs fix(streaming): preserve portal destination ownership 2026-07-25 08:35:12 +02:00
WorldSceneRendererTests.cs feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00