Expand description
core.render_graph: the frame a source’s renderer draws, as data (a world resource): the images it makes and the
passes that make them, in order, each a program of the source’s with the role of everything it reads and writes. A
consumer runs it with generic machinery: it allocates the targets, runs each pass’s programs with the bindings the
pass states, and gives each role its value; it knows no game. Where a renderer’s meaning has no core role, the pass
states the source’s own words (ConstantRole::Material) that the source’s lowering computed from its data.
The scene’s own draws (the G-buffer, the shadow casters, the forward and effect draws) are passes of kind
PassWork::Scene. Each names the draw it makes (the source’s name for it, PassWork::Scene::draw), and the
source states which materials that draw draws and through which program on each material
(crate::StepBindings: the material’s core.shader_binding, another pass of it, or why none is bound): a
material without a step binding for the draw is not drawn in it. Which placements it draws is every placement of
such materials, only the ones that name the draw (crate::StepDraws) where the source picks them per placement,
or the ones that cast shadows (ScenePlacements); a source that does not read what a draw draws says so and why
(SceneMembers::NotRead); the images the draws’ frame textures are in the step (PassWork::Scene::frame)
and the order it draws them in (DrawSorting) are the step’s. Everything else is a full-screen draw, a compute
dispatch, a clear or a copy of the renderer’s own programs, or a slot where another feature draws
(FeatureSlot). What the source’s frame draws that the graph holds no step for is named in
RenderGraph::left_out.
Structs§
- Depth
View - A depth target as a draw binds it.
- Geometry
Stencil - An explicit source approximation for geometry stencil before the lighting stages. A consumer writes
valueunderwrite_maskwherever the view’s depth differs from far depth; lighting states whose reference is unstated usereference. The reason is always reported, never presented as an observed producer. - Lighting
Buffer - An externally supplied graph buffer. The selected passes must not also write it.
- Lighting
Pipeline - The part of a source graph a consumer runs between its material draws and presentation.
Its programs compute in the source’s program frame (
crate::shader::ProgramFrame), as its material programs do, so the G-buffer it imports is already in that frame: a consumer converts its constants by their kinds, not its images. The source selects passes; a consumer never chooses programs by their names. Multiple input views can read the same port (a source may keep two views of scene depth), but each exported meaning has one view. - Outputs
- The render targets and depth a draw writes.
- Region
- A rectangle of a target’s texels at its mip 0: its top-left corner
x,yand itswidthandheight. - Render
Buffer - One buffer the frame makes (or keeps from the frame before): its steps write it as an unordered-access view and read
it as a shader resource, the step that writes it named in the graph’s order (
PassWork::Compute::buffer_writes). - Render
Graph core.render_graph: see the module documentation.- Render
Pass - One step of the frame.
- Render
Target - One image the frame makes (or keeps from the frame before).
- Steps
Dropped - What
RenderGraph::retain_stepsdropped. - Target
View - One subresource range of a target.
Enums§
- Buffer
Size - A buffer’s size.
- Draw
Bucket - The kind of draw a scene step makes, as the source states it (what it draws is
SceneMembers’s, never the kind’s). - Draw
Sorting - The order a scene step draws its draws in, as the source states it.
- Feature
Slot - Another feature’s place in the frame.
- Graph
Primitive - Geometry supplied by a render-graph consumer, in a declared local coordinate system.
- Groups
- How many thread groups a dispatch runs.
- Items
- What one run of a repeated step is for.
- Lighting
Port - The meaning of an image at the lighting boundary, independent of engine names and register numbers.
- Pass
Work - What a step does.
- Presence
- Whether a frame has a step.
- Rounding
- How a view-relative size that is not a whole number of texels is rounded, side by side.
- Runs
- How many times a step runs where the frame has it.
- Scene
Members - Which surfaces a scene step’s draw draws.
- Scene
Placements - Which placements a scene step draws, of the materials its draw draws.
- Scene
View - The view a scene step draws from.
- SortKey
- One key a source sorts a scene step’s draws by.
- Target
Format - How a target stores a texel.
- Target
Shape - A target’s shape.
- Target
Size - A target’s size.
- Trigger
- What makes the source draw a step that only some frames have.
Type Aliases§
- Buffer
Id - A buffer’s index in
RenderGraph::buffers. - Target
Id - A target’s index in
RenderGraph::targets.