Epic: replace the hardcoded forward renderer with a graph-driven hybrid renderer #781

Closed
opened 2026-09-12 22:49:38 +00:00 by SakulFlee · 7 comments
Owner

Workstreams:

  • Frame graph + HDR/post backbone (#647, #585)
  • Scene extraction, resource ownership, one command encoder/submit
  • Material/pipeline v2: pass variants, surface contract, pipeline cache
    (API break allowed; all examples/templates updated in the same change)
  • G-buffer + deferred lighting + clustered/tiled light lists
  • Forward path for sky, transparency, custom shaders, forward-only materials
  • Transparency (#872)
  • Shadows as graph passes; preserve CSM/spot/point
  • Volumetrics (#877), 3D text (#870), billboards (#783)
  • Orthographic camera (#583)
  • Delete the legacy renderer when the new path is complete

Acceptance:

  • One main submit per frame (iced may remain one extra submit until the fork exposes an encoder)
  • No per-frame pipeline/texture/bind-group creation in steady state
  • Hybrid is the default; forward/deferred toggles stay for debugging and tuning
  • All existing examples render correctly
  • New examples: transparency, AA, many lights, custom shader
  • Faster than the current renderer on the existing test scenes

Implementation status (2026-10-29): All workstreams are implemented and merged. Headless pipeline/layout validation is covered by the noop-backend tests (#965). Remaining before closing: real GPU visual and performance validation.

Workstreams: - [x] Frame graph + HDR/post backbone (#647, #585) - [x] Scene extraction, resource ownership, one command encoder/submit - [x] Material/pipeline v2: pass variants, surface contract, pipeline cache (API break allowed; all examples/templates updated in the same change) - [x] G-buffer + deferred lighting + clustered/tiled light lists - [x] Forward path for sky, transparency, custom shaders, forward-only materials - [x] Transparency (#872) - [x] Shadows as graph passes; preserve CSM/spot/point - [x] Volumetrics (#877), 3D text (#870), billboards (#783) - [x] Orthographic camera (#583) - [x] Delete the legacy renderer when the new path is complete Acceptance: - One main submit per frame (iced may remain one extra submit until the fork exposes an encoder) - No per-frame pipeline/texture/bind-group creation in steady state - Hybrid is the default; forward/deferred toggles stay for debugging and tuning - All existing examples render correctly - New examples: transparency, AA, many lights, custom shader - Faster than the current renderer on the existing test scenes --- **Implementation status (2026-10-29):** All workstreams are implemented and merged. Headless pipeline/layout validation is covered by the noop-backend tests (#965). Remaining before closing: real GPU visual and performance validation.
SakulFlee changed title from Refractor main renderer to Rework Renderer / Introduce Hybrid Rendering approach 2026-10-11 16:02:12 +00:00
SakulFlee changed title from Rework Renderer / Introduce Hybrid Rendering approach to Epic: replace the hardcoded forward renderer with a graph-driven hybrid renderer 2026-10-25 17:42:15 +00:00
Author
Owner

No shader graph. Node-based shader composition stays; the missing piece is a surface/material contract.

No shader graph. Node-based shader composition stays; the missing piece is a surface/material contract.
Collaborator

Phase 1 work is split into three PRs:

  • #933 refactor(renderer): extract render scene and own frame resources — ECS→renderer snapshot, renderer-owned fallbacks and world bind group, no raw model pointers.
  • #934 perf(renderer): resolve timestamps in the scene submission — one scene submit instead of render + timestamp submit. Stacked on #933.
  • #935 perf(renderer): reuse instance and cull buffers — in-place instance updates, cached bounds, persistent cull buffers. Stacked on #933.

#934 and #935 will be retargeted to main once #933 lands. Local fmt/clippy/tests pass for the affected crates; the Forgejo runners are currently failing before cargo starts (no space left on device / missing action dist/index.js).

Phase 1 work is split into three PRs: - #933 `refactor(renderer): extract render scene and own frame resources` — ECS→renderer snapshot, renderer-owned fallbacks and world bind group, no raw model pointers. - #934 `perf(renderer): resolve timestamps in the scene submission` — one scene submit instead of render + timestamp submit. Stacked on #933. - #935 `perf(renderer): reuse instance and cull buffers` — in-place instance updates, cached bounds, persistent cull buffers. Stacked on #933. #934 and #935 will be retargeted to `main` once #933 lands. Local fmt/clippy/tests pass for the affected crates; the Forgejo runners are currently failing before cargo starts (no space left on device / missing action `dist/index.js`).
Collaborator

Additional phase-1 PR: #936 perf(renderer): cache the world bind group — keyed by camera/light/environment/shadow identities, built after the shadow pass, with the keyed Arcs kept alive to avoid address-reuse false hits. Also stacked on #933.

Additional phase-1 PR: #936 `perf(renderer): cache the world bind group` — keyed by camera/light/environment/shadow identities, built after the shadow pass, with the keyed Arcs kept alive to avoid address-reuse false hits. Also stacked on #933.
Collaborator

Phase 2 is split into three stacked PRs:

  • #937 feat(renderer): add frame graph and persistent texture pool — orbital_render_graph, dependency-ordered passes, pass timings/debug dump/DOT, descriptor-keyed texture pool, pooled depth target. Base: main.
  • #938 feat(renderer): render the scene into HDR and tonemap in post — HDR scene target, ACES tonemap pass, built-in PBR/sky shaders now output linear HDR, 3D pipelines target Rgba16Float. Stacked on #937.
  • #939 feat(renderer): add FXAA post pass — AntiAliasing::{Off, Fxaa} (FXAA default), pooled LDR intermediate, fullscreen FXAA. Stacked on #938.

SMAA remains the optional follow-up for #585. The 2D/UI/text/overlay paths still render after tonemapping, so UI stays sharp.

Phase 2 is split into three stacked PRs: - #937 `feat(renderer): add frame graph and persistent texture pool` — `orbital_render_graph`, dependency-ordered passes, pass timings/debug dump/DOT, descriptor-keyed texture pool, pooled depth target. Base: `main`. - #938 `feat(renderer): render the scene into HDR and tonemap in post` — HDR scene target, ACES tonemap pass, built-in PBR/sky shaders now output linear HDR, 3D pipelines target `Rgba16Float`. Stacked on #937. - #939 `feat(renderer): add FXAA post pass` — `AntiAliasing::{Off, Fxaa}` (FXAA default), pooled LDR intermediate, fullscreen FXAA. Stacked on #938. SMAA remains the optional follow-up for #585. The 2D/UI/text/overlay paths still render after tonemapping, so UI stays sharp.
Collaborator

Phase 3 PRs:

  • #941 refactor(material): split shader programs from material instances — ShaderProgram + pass-aware PipelineCache, layout/variable split in ShaderDescriptor, shared pipeline cache resource, material render state (AlphaMode, blend, depth write/compare, render queue, shadow flags), and a fix for the eager material-cache path. Base: main.
  • #942 feat(renderer): add sorted transparency and PBR alpha modes — PBR alpha from albedo + Opaque/Mask/Blend, glTF alpha modes, sorted transparent pass, camera/model position data for sorting, shadow filtering for non-casting models. Stacked on #941.

G-buffer/deferred pass variants and the Surface contract are next.

Phase 3 PRs: - #941 `refactor(material): split shader programs from material instances` — `ShaderProgram` + pass-aware `PipelineCache`, layout/variable split in `ShaderDescriptor`, shared pipeline cache resource, material render state (`AlphaMode`, blend, depth write/compare, render queue, shadow flags), and a fix for the eager material-cache path. Base: `main`. - #942 `feat(renderer): add sorted transparency and PBR alpha modes` — PBR alpha from albedo + Opaque/Mask/Blend, glTF alpha modes, sorted transparent pass, camera/model position data for sorting, shadow filtering for non-casting models. Stacked on #941. G-buffer/deferred pass variants and the `Surface` contract are next.
Author
Owner

Implementation complete across the renderer PR series (#937, #939, #942, #948, #953, #954, #955, #956, #958, #960, #962, #963, #964, #965). Workstreams are checked off. The epic stays open only for real GPU visual and performance validation; close it once that passes.

Implementation complete across the renderer PR series (#937, #939, #942, #948, #953, #954, #955, #956, #958, #960, #962, #963, #964, #965). Workstreams are checked off. The epic stays open only for real GPU visual and performance validation; close it once that passes.
Author
Owner

All workstreams are implemented and merged. Real-GPU visual validation has passed, and the remaining performance acceptance is covered by the live frame/stage timings in the debug UI. Closing the epic; any future renderer tuning should be tracked as a separate issue.

All workstreams are implemented and merged. Real-GPU visual validation has passed, and the remaining performance acceptance is covered by the live frame/stage timings in the debug UI. Closing the epic; any future renderer tuning should be tracked as a separate issue.
Sign in to join this conversation.
No project
No assignees
2 participants
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
SakulFlee/Orbital#781
No description provided.