Bin view froxel candidates conservatively

This commit is contained in:
Meta Vens 2026-05-09 21:41:57 +01:00
commit e2a63b8e6d
4 changed files with 176 additions and 16 deletions

View file

@ -21,7 +21,7 @@
"D3D12 field data should live in default-heap structured buffers, updated from the per-frame upload ring by CopyBufferRegion, then bound through transient SRV descriptors owned by the consuming pass. Do not make shaders read dynamic field tables straight from upload memory. D3D11 is reference-only during migration; do not pay DRY tax to preserve it.",
"Transparent D3D12 surfaces must enter the same froxel/field candidate path as volumetrics, but not as pre-averaged froxel color. Grid line transparency is a scene-traversal transparent event: the CPU bins the Grid only into a conservative height slab, the shader brackets the height-sheet crossing inside the active ray interval, samples the height texture at the hit, evaluates cartesian lines/isolines/field lines there, composites without terminating, and keeps marching. Future transparent particles and billboard surfaces need the same candidate/event pipe with quad intersections and richer per-froxel event lists rather than alpha side channels or medium-atlas summaries.",
"D3D12 scene candidate discovery belongs in the view-froxel volume. At 720p the active tube is 160x90x32; primitive and transparent candidate ids are indexed by low-res screen cell and depth slice, then scene rays test exact solid/transparent intersections inside that slice interval. The CPU-filled view-froxel buffers are bootstrap only; the durable path should become GPU/raster binning so per-frame upload bandwidth does not become the next stupid tax.",
"CPU view-froxel binning must be conservative until the real GPU/raster producer exists. Sampling only tube corners/center can miss sub-cell silhouettes and chop solids/Grid lines. The current bootstrap deliberately bins all solids and the Grid into all view-froxel cells, letting exact per-slice intersection reject false positives; this is wasteful scaffolding, not an optimization target.",
"CPU view-froxel binning must be conservative until the real GPU/raster producer exists. The bootstrap bins the Grid by evaluating signed heightfield distance at the eight view-froxel corners and requiring a sign crossing, and bins spheres by testing the sphere center against the view-froxel face planes expanded by radius. Representative center/corner rays alone can miss sub-cell silhouettes and chop solids/Grid lines.",
"D3D12 pixel shader UAV registers share the output namespace. If a shader writes SV_Target0, bind the first manual UAV at u1, not u0.",
"D3D12 shader routing derives its editable source directory from --shader-source/AQUARIUM_SHADER_SOURCE, then watches D3D12Grid/Medium/Scene/Post/Smoke HLSL files directly. Shader/PSO builds run on a background task; startup presents a lightweight loading frame until the first pipeline set is ready, and hot reload keeps the previous pipeline set if compilation fails.",
"Use Vortice at the graphics API membrane. Keep CultMath as the CPU math grammar. Do not let third-party math opinions leak inward unless the conversion is explicit.",