Expand description
Grouped construction inputs for the render backends, plus the requirements
derivation that trims scene-scoped features when a world has no 3D content.
GraphicsSystem init assembles a BackendInit from the drained world assets,
calls resolve_requirements(), and hands it to the backend constructor
selected at compile time (Metal / DirectX / Vulkan). Every backend receives
the same struct; each reads the fields its feature set consumes.
Structs§
- Backend
Init - Everything a backend constructor needs, assembled once by GraphicsSystem init after the world’s assets have been drained and settings resolved.
- Media
Payloads - Decoded image payloads: texture pools, glyph atlases, and the serialised IBL / grading payloads (None = the backend binds identity fallbacks).
- Post
Settings - Post-process and display settings resolved from PostProcessConfig (plus the user’s persisted overrides, the quality-preset ceiling, and the launch’s render requests). Every Option here is an init-time gate: None allocates nothing.
- Render
Requirements - What the world’s content requires of the renderer. Derived from the assembled scene + fx data, backend-agnostic, so all three backends make identical trimming decisions.
- Scene
Data - Static scene geometry and the draw lists built over it.
- Shader
Bytes - Compiled shader payloads. Each backend loads the format its toolchain produced (metallib / DXBC / SPIR-V).
- Shadow
Params - Shadow-mapping knobs from GraphicsConfig.
map_size == 0disables the shadow pipeline and cascade array entirely. - Swapchain
Config - The swapchain-level configuration a backend bakes into its window / surface
at construction: the ring depth and the HDR-output request that together fix
the drawable pixel format and frames-in-flight sizing. A live world swap
(
RenderBackend::reload_world) can only reuse the existing window when these are unchanged; a difference forces a full backend rebuild (a new window). Kept small +Eqso the swap decision is one comparison. - WorldFx
- World-authored effect content drained from components. Empty / None means the backend builds no pipelines or pools for that feature.