feat(renderer): temporal cloud reprojection (ADR-0042) #107

Merged
akadmin merged 1 commit from feat/cloud-temporal-reprojection into main 2026-07-10 12:25:10 +00:00
Owner

Implements #30 — the Horizon paper's critical cloud optimization.

  • Cloud march moved to a dedicated quarter-res (half W × half H) R16G16B16A16_SFLOAT render pass; the main pass gains a bilinear composite pipeline with the original premultiplied blend.
  • 4×4 Bayer-ordered checkerboard: 1/16 of quarter-res pixels march per frame (~1/64 of the old per-frame work); the rest reproject the history at the shell midpoint (per-slot CloudReprojData UBO — push constants stay at the 128-byte minimum).
  • Disocclusion (off-screen / behind previous camera) falls back to a full march — higher quality than the paper's low-res substitution, cost proportional to actual disocclusion.
  • History is per-slot ping-pong (2 images per frame slot): a slot only ever reads the image its own previous use wrote, which wait_for_slot already fenced — zero new synchronization under ADR-0022, at the cost of 2-frame reprojection latency (see ADR-0042 alternatives).
  • Resize recreates buffers and invalidates history (one full-march frame per image).

Verified: 363 unit tests pass (checkerboard coverage/jitter/wrap, UBO layout, extent clamps), clippy/fmt clean, and the standalone runtime ran a clouds-enabled scene for 25 s without vulkano validation errors.

Please eyeball with a moving camera: temporal smearing during fast rotation and 30 Hz shimmer between the two slot chains are the artifacts ADR-0042 calls out with mitigation paths.

🤖 Generated with Claude Code

Implements #30 — the Horizon paper's critical cloud optimization. - Cloud march moved to a dedicated **quarter-res** (half W × half H) `R16G16B16A16_SFLOAT` render pass; the main pass gains a bilinear **composite pipeline** with the original premultiplied blend. - **4×4 Bayer-ordered checkerboard**: 1/16 of quarter-res pixels march per frame (~1/64 of the old per-frame work); the rest **reproject** the history at the shell midpoint (per-slot `CloudReprojData` UBO — push constants stay at the 128-byte minimum). - **Disocclusion** (off-screen / behind previous camera) falls back to a full march — higher quality than the paper's low-res substitution, cost proportional to actual disocclusion. - History is **per-slot ping-pong** (2 images per frame slot): a slot only ever reads the image its own previous use wrote, which `wait_for_slot` already fenced — zero new synchronization under ADR-0022, at the cost of 2-frame reprojection latency (see ADR-0042 alternatives). - Resize recreates buffers and invalidates history (one full-march frame per image). Verified: 363 unit tests pass (checkerboard coverage/jitter/wrap, UBO layout, extent clamps), clippy/fmt clean, and the standalone runtime ran a clouds-enabled scene for 25 s without vulkano validation errors. Please eyeball with a moving camera: temporal smearing during fast rotation and 30 Hz shimmer between the two slot chains are the artifacts ADR-0042 calls out with mitigation paths. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(renderer): temporal reprojection for volumetric clouds (ADR-0042)
All checks were successful
CI / build (pull_request) Successful in 3m24s
fe23f5f0e9
The cloud march moves out of the main pass into a dedicated
quarter-resolution R16F render pass: only 1 of every 4x4 pixels
(Bayer-ordered checkerboard) ray-marches per frame, the rest reproject
the history at the shell midpoint via a per-slot CloudReprojData UBO;
disocclusion at screen edges falls back to a full march. History is
per-slot ping-pong (2 images per frame slot) so the 2-frame latency
needs zero new sync under the ADR-0022 fence discipline. A new
composite pipeline bilinearly upscales the buffer into the main pass
with the original premultiplied blend. Steady-state march cost drops
to ~1/64 of ADR-0041 per frame.

Closes #30

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
akadmin deleted branch feat/cloud-temporal-reprojection 2026-07-10 12:25:10 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
akadmin/NemesisEngine!107
No description provided.