feat(renderer): allow switching the hybrid path back to forward #946

Merged
SakulFlee merged 2 commits from feat/renderer-forward-fallback into main 2026-10-26 18:35:46 +00:00
Collaborator

Summary

Phase 4d: expose a forward fallback for the hybrid renderer.

  • Renderer::set_deferred_enabled(bool) / deferred_enabled().
  • Deferred remains enabled by default.
  • Disabling it routes every opaque material through the forward pass, including PBR materials that have G-buffer pipelines.
  • The deferred/culling bind-group caches are cleared while the deferred path is unused so pooled render targets can be released.
  • The existing graph path (clear-depth -> models -> [transparent] -> tonemap) is reused for the fallback.

This gives a way to compare the forward and hybrid paths and a safe fallback for materials/scenes where deferred is not a good fit.

Verification

  • cargo fmt --all -- --check
  • cargo clippy for the touched crates and all three example templates with --all-targets -D warnings
  • cargo test -p orbital_renderer
  • cargo check for the renderer, app and all three example templates
  • GUI examples were not launched in this environment (no display/GPU)

Stacked on #945.

Refs #781.

## Summary Phase 4d: expose a forward fallback for the hybrid renderer. - `Renderer::set_deferred_enabled(bool)` / `deferred_enabled()`. - Deferred remains enabled by default. - Disabling it routes every opaque material through the forward pass, including PBR materials that have G-buffer pipelines. - The deferred/culling bind-group caches are cleared while the deferred path is unused so pooled render targets can be released. - The existing graph path (`clear-depth -> models -> [transparent] -> tonemap`) is reused for the fallback. This gives a way to compare the forward and hybrid paths and a safe fallback for materials/scenes where deferred is not a good fit. ## Verification - `cargo fmt --all -- --check` - `cargo clippy` for the touched crates and all three example templates with `--all-targets -D warnings` - `cargo test -p orbital_renderer` - `cargo check` for the renderer, app and all three example templates - GUI examples were not launched in this environment (no display/GPU) Stacked on #945. Refs #781.
feat(renderer): allow switching the hybrid path back to forward
Some checks failed
PR / test (pull_request) Has been cancelled
Lint / lint (pull_request) Has been cancelled
3b0bbb1044
Add Renderer::set_deferred_enabled/deferred_enabled. Deferred remains the default. Disabling it routes every opaque material through the forward pass, including PBR materials that have G-buffer pipelines, and clears the cached deferred/culling bind groups so pooled render targets can be released.
fix(renderer): guard tile size against malformed params
All checks were successful
Lint / lint (pull_request) Successful in 1m12s
PR / test (pull_request) Successful in 2m36s
02ebfa9ec6
Clamp the shader-side tile size to at least one pixel before dividing for the tile index. The CPU always writes 16, but this prevents division by zero if a stale or partially initialized params buffer is ever bound.

Smart test results

Result: PASS

Scope: orbital_renderer, orbital_shader_pbr

Reason: directly changed crates

Elapsed: 1m 39s

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 8 8 0 0 - 0.05s
orbital_shader_pbr 4 4 0 0 - 0.02s
pie showData
    title Nextest outcomes
    "Passed" : 12
xychart-beta
    title "Slowest crates (nextest seconds)"
    x-axis ["orbital_renderer", "orbital_shader_pbr"]
    y-axis "Seconds" 0 --> 1
    bar [0.05, 0.02]
<!-- orbital-ci-test-results --> ## Smart test results **Result:** PASS **Scope:** orbital_renderer, orbital_shader_pbr **Reason:** directly changed crates **Elapsed:** 1m 39s [Workflow run](https://forgejo.sakul-flee.de/SakulFlee/Orbital/actions/runs/681) **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 | 8 | 8 | 0 | 0 | - | 0.05s | | orbital_shader_pbr | 4 | 4 | 0 | 0 | - | 0.02s | ```mermaid pie showData title Nextest outcomes "Passed" : 12 ``` ```mermaid xychart-beta title "Slowest crates (nextest seconds)" x-axis ["orbital_renderer", "orbital_shader_pbr"] y-axis "Seconds" 0 --> 1 bar [0.05, 0.02] ```
SakulFlee changed target branch from feat/renderer-light-culling to main 2026-10-26 18:35:13 +00:00
SakulFlee deleted branch feat/renderer-forward-fallback 2026-10-26 18:35:46 +00:00
Sign in to join this conversation.
No description provided.