feat(renderer): add LUT-based SMAA anti-aliasing #958

Merged
SakulFlee merged 1 commit from feat/renderer-smaa into main 2026-10-28 04:53:35 +00:00
Owner

Summary

Completes the 1.6 anti-aliasing scope with WGSL SMAA 1x.

  • Adds AntiAliasing::Smaa alongside Off and Fxaa, still selected through AppSettings::anti_aliasing.
  • Adapts the MIT-licensed wgsl-smaa port of the SMAA reference implementation: luma edge detection, blending-weight calculation, and neighborhood blending.
  • All three passes are WGSL and are recorded into the renderer's existing command encoder, preserving one scene submit per frame.
  • No HLSL or GLSL source and no additional Cargo dependency. The official area/search LUTs stay as embedded binary data with their MIT notice.
  • Luma edge detection uses the SMAA_SRGB_INPUT override when the surface format is sRGB, so gamma-encoded input is handled correctly.
  • Tonemaps into the SMAA color target and resolves into the surface; 2D, UI, and text remain after the post chain.
  • Keeps the existing FXAA path and the render graph's FXAA/AA-off behavior unchanged.
  • Integrates SMAA into Examples/all-in-one and shows the active mode in the HUD.
  • Adds graph tests for SMAA and SMAA + volumetrics ordering, plus WGSL validation for all three SMAA modules.

Validation

  • cargo test --workspace --no-fail-fast passes.
  • cargo check --workspace with the workspace clippy driver and -D warnings passes.
  • Rust formatting checks pass across Crates/ and Examples/.
  • All three SMAA WGSL modules parse and validate through Naga.
  • Visual verification still needs a display/GPU machine; this environment cannot render a frame.

Closes #585.

## Summary Completes the 1.6 anti-aliasing scope with WGSL SMAA 1x. - Adds `AntiAliasing::Smaa` alongside `Off` and `Fxaa`, still selected through `AppSettings::anti_aliasing`. - Adapts the MIT-licensed [wgsl-smaa](https://github.com/dmnsgn/shaders-smaa) port of the SMAA reference implementation: luma edge detection, blending-weight calculation, and neighborhood blending. - All three passes are WGSL and are recorded into the renderer's existing command encoder, preserving one scene submit per frame. - No HLSL or GLSL source and no additional Cargo dependency. The official area/search LUTs stay as embedded binary data with their MIT notice. - Luma edge detection uses the `SMAA_SRGB_INPUT` override when the surface format is sRGB, so gamma-encoded input is handled correctly. - Tonemaps into the SMAA color target and resolves into the surface; 2D, UI, and text remain after the post chain. - Keeps the existing FXAA path and the render graph's FXAA/AA-off behavior unchanged. - Integrates SMAA into `Examples/all-in-one` and shows the active mode in the HUD. - Adds graph tests for SMAA and SMAA + volumetrics ordering, plus WGSL validation for all three SMAA modules. ## Validation - `cargo test --workspace --no-fail-fast` passes. - `cargo check --workspace` with the workspace clippy driver and `-D warnings` passes. - Rust formatting checks pass across `Crates/` and `Examples/`. - All three SMAA WGSL modules parse and validate through Naga. - Visual verification still needs a display/GPU machine; this environment cannot render a frame. Closes #585.
feat(renderer): add LUT-based SMAA anti-aliasing
Some checks failed
Lint / lint (pull_request) Successful in 1m42s
PR / test (pull_request) Has been cancelled
Templates / templates (pull_request) Has been cancelled
cc4ed98cb7
SakulFlee force-pushed feat/renderer-smaa from cc4ed98cb7
Some checks failed
Lint / lint (pull_request) Successful in 1m42s
PR / test (pull_request) Has been cancelled
Templates / templates (pull_request) Has been cancelled
to 375687f68f
All checks were successful
Lint / lint (pull_request) Successful in 3m52s
Templates / templates (pull_request) Successful in 5m49s
PR / test (pull_request) Successful in 16m10s
2026-10-27 23:53:10 +00:00
Compare

Smart test results

Result: PASS

Scope: orbital_renderer

Reason: directly changed crates

Elapsed: 3m 54s

Workflow run

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

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

Crate Nextest Passed Failed Skipped Doctests Time
orbital_renderer 12 12 0 0 - 0.15s
pie showData
    title Nextest outcomes
    "Passed" : 12
<!-- orbital-ci-test-results --> ## Smart test results **Result:** PASS **Scope:** orbital_renderer **Reason:** directly changed crates **Elapsed:** 3m 54s [Workflow run](https://forgejo.sakul-flee.de/SakulFlee/Orbital/actions/runs/782) **Overall:** 12 tests, 12 passed, 0 failed, 0 skipped **Nextest:** 12 tests, 12 passed, 0 failed, 0 skipped **Doctests:** no tests reported | Crate | Nextest | Passed | Failed | Skipped | Doctests | Time | | --- | ---: | ---: | ---: | ---: | ---: | ---: | | orbital_renderer | 12 | 12 | 0 | 0 | - | 0.15s | ```mermaid pie showData title Nextest outcomes "Passed" : 12 ```
SakulFlee force-pushed feat/renderer-smaa from 375687f68f
All checks were successful
Lint / lint (pull_request) Successful in 3m52s
Templates / templates (pull_request) Successful in 5m49s
PR / test (pull_request) Successful in 16m10s
to ddbbf495e6
All checks were successful
Lint / lint (pull_request) Successful in 1m42s
Templates / templates (pull_request) Successful in 2m11s
PR / test (pull_request) Successful in 4m23s
2026-10-28 00:24:14 +00:00
Compare
SakulFlee force-pushed feat/renderer-smaa from ddbbf495e6
All checks were successful
Lint / lint (pull_request) Successful in 1m42s
Templates / templates (pull_request) Successful in 2m11s
PR / test (pull_request) Successful in 4m23s
to 19b506a497
All checks were successful
Lint / lint (pull_request) Successful in 1m39s
PR / test (pull_request) Successful in 1m46s
Templates / templates (pull_request) Successful in 1m21s
2026-10-28 03:16:53 +00:00
Compare
SakulFlee force-pushed feat/renderer-smaa from 19b506a497
All checks were successful
Lint / lint (pull_request) Successful in 1m39s
PR / test (pull_request) Successful in 1m46s
Templates / templates (pull_request) Successful in 1m21s
to 24d10180f4
All checks were successful
Lint / lint (pull_request) Successful in 5m15s
PR / test (pull_request) Successful in 6m11s
Templates / templates (pull_request) Successful in 2m40s
2026-10-28 04:06:13 +00:00
Compare
SakulFlee deleted branch feat/renderer-smaa 2026-10-28 04:53:35 +00:00
Sign in to join this conversation.
No description provided.