pub struct ShaderNode {
pub shader: Program,
pub inputs: Vec<NodeId>,
pub buffer: Buffer,
}
Expand description
Represents a single shader, the inputs it expects, and the texture it owns that is updated in each forward pass.
Fields§
§shader: Program
§inputs: Vec<NodeId>
§buffer: Buffer
Trait Implementations§
Source§impl Debug for ShaderNode
impl Debug for ShaderNode
Source§impl Node for ShaderNode
impl Node for ShaderNode
Source§fn outputs(&self) -> (&str, UniformValue<'_>)
fn outputs(&self) -> (&str, UniformValue<'_>)
Returns (kind, uniforms) tuple.
Source§fn texture(&self) -> Option<&Texture2d>
fn texture(&self) -> Option<&Texture2d>
Denotes whether the node produces an output texture.
This function should be consistent,
e.g. if it returns
Some
it should always return
Some
.fn forward(&mut self, rect_strip: &RectStrip, uniforms: UniformMap<'_>)
Auto Trait Implementations§
impl !Freeze for ShaderNode
impl !RefUnwindSafe for ShaderNode
impl !Send for ShaderNode
impl !Sync for ShaderNode
impl Unpin for ShaderNode
impl !UnwindSafe for ShaderNode
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