pub struct Node {
pub id: NodeId,
pub pass: PassKind,
pub inputs: Vec<ResourceId>,
pub outputs: Vec<ResourceId>,
pub material: Option<Material>,
}Expand description
One unit of GPU work in the render graph.
Fields§
§id: NodeId§pass: PassKind§inputs: Vec<ResourceId>Resources this node reads (texture samples, uniform reads, storage reads). The compiler enforces that each listed resource is either a graph input OR an output of some other node.
outputs: Vec<ResourceId>Resources this node writes (color attachments, storage writes). The compiler enforces that each output has exactly one writer node — pleme-io’s “solve once, in one place” rule applied to GPU resources.
material: Option<Material>Optional material to dispatch. None is valid for nodes
that just clear a target or do a pure blit (no shader).
Implementations§
Source§impl Node
impl Node
Sourcepub fn fullscreen_effect(
id: impl Into<NodeId>,
material: Material,
input: impl Into<ResourceId>,
output: impl Into<ResourceId>,
) -> Self
pub fn fullscreen_effect( id: impl Into<NodeId>, material: Material, input: impl Into<ResourceId>, output: impl Into<ResourceId>, ) -> Self
Convenience constructor for the common case: a render-pass node with one input texture (the prior scene) and one output texture (the post-processed result).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Node
impl<'de> Deserialize<'de> for Node
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more