pub struct CrossfadeNode {
pub factor: f32,
pub to_rgba: Vec<u8>,
pub to_width: u32,
pub to_height: u32,
/* private fields */
}Expand description
Linear crossfade between two RGBA frames.
factor = 0.0→ output equals the input frame (inputs[0]/process_cpuargument).factor = 1.0→ output equalsto_rgba.factor = 0.5→ arithmetic mean of both frames.
The “to” frame is stored in the node at construction time.
Fields§
§factor: f32Blend factor: 0.0 (from) → 1.0 (to).
to_rgba: Vec<u8>The “to” frame as RGBA bytes. Length must equal to_width × to_height × 4.
to_width: u32Width of to_rgba.
to_height: u32Height of to_rgba.
Implementations§
Trait Implementations§
Source§impl RenderNode for CrossfadeNode
Available on crate feature wgpu only.
impl RenderNode for CrossfadeNode
Available on crate feature
wgpu only.Source§fn input_count(&self) -> usize
fn input_count(&self) -> usize
Number of input textures required by this node (default: 1).
Source§fn process(
&self,
inputs: &[&Texture],
outputs: &[&Texture],
ctx: &RenderContext,
)
fn process( &self, inputs: &[&Texture], outputs: &[&Texture], ctx: &RenderContext, )
Run the GPU render pass. Read more
Source§fn pass_count(&self) -> usize
fn pass_count(&self) -> usize
Number of render passes (default: 1). Multi-pass nodes (e.g. gaussian
blur) return 2 or more.
Source§impl RenderNodeCpu for CrossfadeNode
impl RenderNodeCpu for CrossfadeNode
Auto Trait Implementations§
impl !Freeze for CrossfadeNode
impl !RefUnwindSafe for CrossfadeNode
impl !UnwindSafe for CrossfadeNode
impl Send for CrossfadeNode
impl Sync for CrossfadeNode
impl Unpin for CrossfadeNode
impl UnsafeUnpin for CrossfadeNode
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