pub enum PassWork {
Geometry {
primitive: GraphPrimitive,
object: Entity,
stages: Vec<StageBinding>,
state: RenderState,
outputs: Outputs,
},
Screen {
vertices: u32,
stages: Vec<StageBinding>,
state: RenderState,
outputs: Outputs,
region: Option<Region>,
},
Compute {
stage: StageBinding,
groups: Groups,
writes: Vec<(ResourceId, TargetView)>,
buffer_writes: Vec<(ResourceId, BufferId)>,
},
Scene {
bucket: DrawBucket,
view: SceneView,
outputs: Outputs,
draw: String,
members: SceneMembers,
frame: Vec<(FrameTexture, TargetView)>,
sorting: DrawSorting,
},
Clear {
target: TargetView,
value: [f32; 4],
},
Copy {
from: TargetView,
to: TargetView,
},
ClearBuffer {
buffer: BufferId,
value: [u32; 4],
},
CopyBuffer {
from: BufferId,
to: BufferId,
},
Slot {
slot: FeatureSlot,
outputs: Outputs,
},
Group {
steps: Vec<RenderPass>,
},
}Expand description
What a step does.
Variants§
Geometry
A procedural primitive in the space of object’s core.transform. Object constant roles use that
object-to-world transform; vertex streams use the primitive’s local attributes.
This is a volume/light draw, independent of scene meshes and their material buckets.
Screen
A draw of vertices vertices that cover the view (3: a triangle larger than the view; 4: a quad) through
stages (a vertex and a pixel program), with state, into outputs. The vertex program makes them from their
index, or reads them from the inputs its binding states as crate::shader::InputRole::ScreenTriangle.
Compute
A dispatch of a compute program: groups thread groups, writing the targets its unordered-access resources name.
Fields
stage: StageBindingwrites: Vec<(ResourceId, TargetView)>buffer_writes: Vec<(ResourceId, BufferId)>The graph’s buffers it writes, by the program’s unordered-access resource.
Scene
The scene’s draws of a bucket through their materials’ programs, into outputs, seen from view.
Fields
bucket: DrawBucketThe kind of draw.
draw: StringThe source’s name for the draw the step makes (Unity’s LightMode pass of its draw, Sekiro’s bucket). Steps
that make the same draw (the cascades of a shadow) draw the same surfaces.
members: SceneMembersWhich surfaces it draws.
frame: Vec<(FrameTexture, TargetView)>The image each frame texture its draws read is in this step (crate::shader::TextureSource::Frame), each
role once: a role not listed is no image of the graph’s here, and a program reading it reads what its
binding’s consumer says.
sorting: DrawSortingThe order it draws them in.
Clear
Set every texel of a target’s view to a value.
Copy
Copy one target’s view into another’s of the same size and format.
ClearBuffer
Set every element of a buffer to a value (its 32-bit words, as an unordered-access clear writes them).
CopyBuffer
Copy one buffer into another of the same size.
Slot
Where another feature draws, into these outputs (its own programs and data).
Group
Steps that run together, in order: the unit a repeated step (Runs::Each) runs once per item, where the
source runs several steps for each item (a copy, then a draw that reads it). Never empty.
Fields
steps: Vec<RenderPass>