Add D3D12 medium ray debug views

This commit is contained in:
Meta Vens 2026-05-09 17:28:52 +01:00
commit ca5106def2
6 changed files with 177 additions and 0 deletions

View file

@ -53,6 +53,10 @@ has feature parity.
opacity and coverage rather than surface normals. Grid/transparent
contributions therefore get history through the medium path without becoming
fake alpha surfaces.
- D3D12 debug modes `9` and `10` are direct ray-step medium previews, not
repainted atlas views. The resolve shader samples the field instance buffer
for the requested `MediumDebugStep`, so density/transmittance diagnostics can
be compared against the froxel atlas in mode `11`.
- Resize waits for the GPU, releases swapchain-dependent resources, rebuilds
static shader/RTV descriptor arenas, then recreates backbuffer views and
dependent render targets. Descriptor exhaustion on resize is no longer a

View file

@ -102,6 +102,10 @@ overlay/debug UI still need to move. Medium-only pixels already use a
density-weighted ray centroid and `FIELD_ID_MEDIUM`, so transparent Grid and fog
contribution can accumulate through the medium history path without inventing a
single alpha-surface hit.
D3D12 debug modes `9` and `10` are direct ray-step density/transmittance
previews from the field instance buffer, matching the D3D11 diagnostic contract
rather than sampling the froxel atlas. Mode `11` remains the froxel density
view.
The shader far distance is frame-derived, not a fixed constant. C# sends the
distance from the camera to the Grid origin plus the Grid radius, which matches