pub struct RenderGraph {
pub targets: Vec<RenderTarget>,
pub buffers: Vec<RenderBuffer>,
pub passes: Vec<RenderPass>,
pub picture: Option<TargetId>,
pub lighting: Option<LightingPipeline>,
pub local_shadow_atlas: Option<LocalShadowAtlas>,
pub left_out: Vec<String>,
}Expand description
core.render_graph: see the module documentation.
Fields§
§targets: Vec<RenderTarget>§buffers: Vec<RenderBuffer>The buffers the frame’s own steps write and read (the light lists a compute step builds for the lighting steps).
passes: Vec<RenderPass>§picture: Option<TargetId>The target that holds the finished picture, before any interface the game draws over it, and before what
RenderGraph::left_out names after it.
lighting: Option<LightingPipeline>A source-described lighting subgraph’s imports, selected passes and linear HDR handoff.
local_shadow_atlas: Option<LocalShadowAtlas>The layout of the frame’s local-light shadow atlas, where the source has one: the target the steps that run per
face (Items::LocalShadowFaces) draw into and the shadowed lights’ steps (Items::ShadowedLights) read,
its regions, faces and projection. Which lights a frame shadows is the consumer’s choice
(crate::shader::LocalShadowAtlas::place).
left_out: Vec<String>What the source’s frame draws that the graph holds no step for, each named with why (its post-processing, where that is not traced: the picture is then the image before it). Empty where the graph holds every step.
Implementations§
Source§impl RenderGraph
impl RenderGraph
Sourcepub fn check(&self) -> Result<(), String>
pub fn check(&self) -> Result<(), String>
The targets are well formed (a size and at least one mip), and the buffers (some bytes), every view names a target and a mip it has and every buffer reference a buffer, colour and depth go to targets of their kind, a step in some frames names them, a repeated step states its counts, a scene step names its draw (the steps that make one draw drawing the same surfaces), why it does not read what the draw draws where it does not, gives each frame texture once as a target of the role’s shape and states its sort keys once each (or why it states none), what is left out is named, and the picture is a target.
Sourcepub fn scene_draws(&self) -> Vec<(&str, &SceneMembers)>
pub fn scene_draws(&self) -> Vec<(&str, &SceneMembers)>
The draws the scene steps make, a group’s steps’ included, each with the surfaces it draws: a draw several steps make is listed once for each.
Sourcepub fn retain_steps(&mut self, keep: &dyn Fn(Entity) -> bool) -> StepsDropped
pub fn retain_steps(&mut self, keep: &dyn Fn(Entity) -> bool) -> StepsDropped
Keep the steps that draw with entities keep accepts alone; drop each other top-level step whole (a group’s
steps run together, so a group goes with any of its steps). The lighting pipeline goes where it selected a
dropped step, and its other selections are renumbered; the picture goes where a dropped step wrote it. The
targets and buffers stay. The steps left draw what they drew: a step reading what a dropped one made reads
the target as the frame leaves it, as the graph states for a step a frame does not have.
Trait Implementations§
Source§impl Clone for RenderGraph
impl Clone for RenderGraph
Source§impl Debug for RenderGraph
impl Debug for RenderGraph
Source§impl Default for RenderGraph
impl Default for RenderGraph
Source§impl PartialEq for RenderGraph
impl PartialEq for RenderGraph
Source§impl Resource for RenderGraph
impl Resource for RenderGraph
Source§fn verify(&self, w: &World) -> Result<(), String>
fn verify(&self, w: &World) -> Result<(), String>
RenderGraph::check, and every step’s stage binding verified against its program as a material’s is, with the
graph’s targets allowed as textures (a slot reads a target as the target’s shape).
Source§fn retain_references(&mut self, keep: &dyn Fn(Entity) -> bool)
fn retain_references(&mut self, keep: &dyn Fn(Entity) -> bool)
The steps that draw with an entity that left go (RenderGraph::retain_steps); the world counts them and the
step bindings that named their draws (crate::Dropped).
const NAME: &'static str = "core.render_graph"
Source§fn references(&self, out: &mut Vec<Entity>)
fn references(&self, out: &mut Vec<Entity>)
out. A resource holding entity references must declare
every one of them and implement Resource::retain_references.