feat(volumetrics): add temporal froxel history #986

Merged
SakulFlee merged 1 commit from feat/volumetric-temporal-history into main 2026-10-30 02:56:40 +00:00
Owner

Summary

Adds volumetric-only temporal history, independent of the screen-space AA mode.

What changed

  • Froxel injection now applies a per-frame sub-froxel jitter.
  • A new compute pass reprojects the previous froxel volume into the current camera and blends it with the current injection.
  • History is reset on:
    • resolution changes
    • froxel-grid / max-distance changes
    • missing or changed camera data
    • large camera cuts
    • volumetrics being disabled
  • Added Camera::view_matrix() and exposed the current view matrix through RenderCamera.
  • Added a noop-backend test that renders two frames with a camera, exercising the history allocation, reprojection bind group, and compute pass.
  • Documented the temporal froxel pass in AGENTS.md.

This is intentionally not full-screen TAA. FXAA, SMAA 1x, or Off remain the final AA choice; the volumetric history runs before the post chain regardless.

Notes

  • History is two persistent 3D textures at the froxel grid size. High volumetric quality therefore increases memory use.
  • Reprojection handles camera motion; it does not yet use motion vectors for individually moving fog volumes. Fog is low-frequency, but moving geometry near fog can still show minor disocclusion artifacts.

Validation

  • cargo test --workspace --no-fail-fast passes.
  • cargo check --workspace with the workspace clippy driver and -D warnings passes.
  • rustfmt --check passes.
  • No GPU visual validation was possible locally.

Related: #969, #978, #981.

## Summary Adds volumetric-only temporal history, independent of the screen-space AA mode. ## What changed - Froxel injection now applies a per-frame sub-froxel jitter. - A new compute pass reprojects the previous froxel volume into the current camera and blends it with the current injection. - History is reset on: - resolution changes - froxel-grid / max-distance changes - missing or changed camera data - large camera cuts - volumetrics being disabled - Added `Camera::view_matrix()` and exposed the current view matrix through `RenderCamera`. - Added a noop-backend test that renders two frames with a camera, exercising the history allocation, reprojection bind group, and compute pass. - Documented the temporal froxel pass in `AGENTS.md`. This is intentionally not full-screen TAA. FXAA, SMAA 1x, or Off remain the final AA choice; the volumetric history runs before the post chain regardless. ## Notes - History is two persistent 3D textures at the froxel grid size. High volumetric quality therefore increases memory use. - Reprojection handles camera motion; it does not yet use motion vectors for individually moving fog volumes. Fog is low-frequency, but moving geometry near fog can still show minor disocclusion artifacts. ## Validation - `cargo test --workspace --no-fail-fast` passes. - `cargo check --workspace` with the workspace clippy driver and `-D warnings` passes. - `rustfmt --check` passes. - No GPU visual validation was possible locally. Related: #969, #978, #981.
feat(volumetrics): add temporal froxel history
All checks were successful
Lint / lint (pull_request) Successful in 1m22s
PR / test (pull_request) Successful in 3m8s
50dff518e9

Smart test results

Result: PASS

Scope: orbital_camera, orbital_renderer

Reason: directly changed crates

Elapsed: 2m 36s

Workflow run

Overall: 26 tests, 26 passed, 0 failed, 0 skipped

Nextest: 26 tests, 26 passed, 0 failed, 0 skipped
Doctests: no tests reported

Crate Nextest Passed Failed Skipped Doctests Time
orbital_camera 8 8 0 0 - 0.04s
orbital_renderer 18 18 0 0 - 0.19s
pie showData
    title Nextest outcomes
    "Passed" : 26
xychart-beta
    title "Slowest crates (nextest seconds)"
    x-axis ["orbital_renderer", "orbital_camera"]
    y-axis "Seconds" 0 --> 1
    bar [0.19, 0.04]
<!-- orbital-ci-test-results --> ## Smart test results **Result:** PASS **Scope:** orbital_camera, orbital_renderer **Reason:** directly changed crates **Elapsed:** 2m 36s [Workflow run](https://forgejo.sakul-flee.de/SakulFlee/Orbital/actions/runs/889) **Overall:** 26 tests, 26 passed, 0 failed, 0 skipped **Nextest:** 26 tests, 26 passed, 0 failed, 0 skipped **Doctests:** no tests reported | Crate | Nextest | Passed | Failed | Skipped | Doctests | Time | | --- | ---: | ---: | ---: | ---: | ---: | ---: | | orbital_camera | 8 | 8 | 0 | 0 | - | 0.04s | | orbital_renderer | 18 | 18 | 0 | 0 | - | 0.19s | ```mermaid pie showData title Nextest outcomes "Passed" : 26 ``` ```mermaid xychart-beta title "Slowest crates (nextest seconds)" x-axis ["orbital_renderer", "orbital_camera"] y-axis "Seconds" 0 --> 1 bar [0.19, 0.04] ```
Sign in to join this conversation.
No description provided.