feat(renderer): add FXAA post pass #939

Merged
SakulFlee merged 1 commit from feat/renderer-fxaa into main 2026-10-26 02:58:50 +00:00
Collaborator

Summary

Stacked on #938 (HDR + tonemap). Adds the first anti-aliasing mode from #585.

  • New AntiAliasing::{Off, Fxaa} setting in AppSettings; FXAA is the default.
  • Off: tonemap writes directly to the surface, as before.
  • Fxaa: tonemap writes to a pooled LDR target, then a fullscreen FXAA pass resolves to the surface.
  • FXAA only affects the 3D scene; 2D/UI/text/overlays stay after the post chain.
  • FXAA resolution parameters update on resize.
  • Add naga WGSL validation for the FXAA shader.

SMAA is the remaining part of #585 and should follow as a separate pass chain (edge detection, blend weights, neighborhood blending).

Verification

  • cargo fmt --all -- --check
  • cargo clippy -p orbital_renderer -p orbital_app -p orbital_model -p orbital_world_environment -p orbital_shader_pbr -- -D warnings
  • cargo test -p orbital_renderer -p orbital_app -p orbital_model -p orbital_resources --no-fail-fast
  • cargo check -p template_minimal -p template_all_in_one -p template_2d
  • GUI examples were not launched in this environment (no display/GPU).

Refs #585, #647, #781.

## Summary Stacked on #938 (HDR + tonemap). Adds the first anti-aliasing mode from #585. - New `AntiAliasing::{Off, Fxaa}` setting in `AppSettings`; FXAA is the default. - `Off`: tonemap writes directly to the surface, as before. - `Fxaa`: tonemap writes to a pooled LDR target, then a fullscreen FXAA pass resolves to the surface. - FXAA only affects the 3D scene; 2D/UI/text/overlays stay after the post chain. - FXAA resolution parameters update on resize. - Add naga WGSL validation for the FXAA shader. SMAA is the remaining part of #585 and should follow as a separate pass chain (edge detection, blend weights, neighborhood blending). ## Verification - `cargo fmt --all -- --check` - `cargo clippy -p orbital_renderer -p orbital_app -p orbital_model -p orbital_world_environment -p orbital_shader_pbr -- -D warnings` - `cargo test -p orbital_renderer -p orbital_app -p orbital_model -p orbital_resources --no-fail-fast` - `cargo check -p template_minimal -p template_all_in_one -p template_2d` - GUI examples were not launched in this environment (no display/GPU). Refs #585, #647, #781.
feat(renderer): add FXAA post pass
All checks were successful
Lint / lint (pull_request) Successful in 1m8s
PR / test (pull_request) Successful in 2m25s
0e220fb0ee
Add an AntiAliasing setting (Off or Fxaa, default Fxaa) to AppSettings. When enabled, the tonemap writes to a pooled LDR target and a fullscreen FXAA pass resolves it to the surface. When disabled, tonemap writes directly to the surface as before.

FXAA only affects the 3D scene; 2D, UI, text and overlays still render after the post chain. Add naga validation for the FXAA shader.

Smart test results

Result: PASS

Scope: orbital_app, orbital_renderer, orbital_resources

Reason: directly changed crates

Elapsed: 1m 47s

Workflow run

Overall: 35 tests, 34 passed, 0 failed, 1 skipped

Nextest: 34 tests, 34 passed, 0 failed, 0 skipped
Doctests: 1 tests, 0 passed, 0 failed, 1 skipped

Outcome charts are split between nextest and doctests. The timing chart covers nextest only.

Crate Nextest Passed Failed Skipped Doctests Time
orbital_app 10 10 0 0 0/1 0.07s
orbital_renderer 4 4 0 0 - 0.02s
orbital_resources 20 20 0 0 - 0.16s
pie showData
    title Nextest outcomes
    "Passed" : 34
pie showData
    title Doctest outcomes
    "Skipped" : 1
xychart-beta
    title "Slowest crates (nextest seconds)"
    x-axis ["orbital_resources", "orbital_app", "orbital_renderer"]
    y-axis "Seconds" 0 --> 1
    bar [0.16, 0.07, 0.02]
<!-- orbital-ci-test-results --> ## Smart test results **Result:** PASS **Scope:** orbital_app, orbital_renderer, orbital_resources **Reason:** directly changed crates **Elapsed:** 1m 47s [Workflow run](https://forgejo.sakul-flee.de/SakulFlee/Orbital/actions/runs/645) **Overall:** 35 tests, 34 passed, 0 failed, 1 skipped **Nextest:** 34 tests, 34 passed, 0 failed, 0 skipped **Doctests:** 1 tests, 0 passed, 0 failed, 1 skipped _Outcome charts are split between nextest and doctests. The timing chart covers nextest only._ | Crate | Nextest | Passed | Failed | Skipped | Doctests | Time | | --- | ---: | ---: | ---: | ---: | ---: | ---: | | orbital_app | 10 | 10 | 0 | 0 | 0/1 | 0.07s | | orbital_renderer | 4 | 4 | 0 | 0 | - | 0.02s | | orbital_resources | 20 | 20 | 0 | 0 | - | 0.16s | ```mermaid pie showData title Nextest outcomes "Passed" : 34 ``` ```mermaid pie showData title Doctest outcomes "Skipped" : 1 ``` ```mermaid xychart-beta title "Slowest crates (nextest seconds)" x-axis ["orbital_resources", "orbital_app", "orbital_renderer"] y-axis "Seconds" 0 --> 1 bar [0.16, 0.07, 0.02] ```
SakulFlee changed target branch from feat/renderer-hdr-post to main 2026-10-26 02:58:30 +00:00
SakulFlee deleted branch feat/renderer-fxaa 2026-10-26 02:59:00 +00:00
Sign in to join this conversation.
No description provided.