pub struct FadeTransitionNode {
pub progress: f32,
pub to_rgba: Vec<u8>,
pub to_width: u32,
pub to_height: u32,
}Expand description
Linear cross-blend: clip A mixed into clip B by progress.
This is FFmpeg’s xfade=transition=fade, not its dissolve — dissolve reveals
clip B one pixel at a time and never produces a mixed value (see
DissolveTransitionNode).
progress = 0 outputs clip A, progress = 1 outputs clip B, and every value
between is the per-channel mix of the two (alpha included, as the sibling
transitions do).
The GPU path reuses crossfade.wgsl rather than carrying a second copy of the same
mix: that shader’s bindings already match the layout this module’s shared
build_pipeline sets up, and its single-f32 uniform is this node’s progress. It
is therefore the same operation as CrossfadeNode,
exposed with the progress / to_rgba shape the rest of this module uses so a
transition set can be mapped uniformly.
Like its siblings this node renders to an Rgba8Unorm target (the shared
build_pipeline hard-codes that format), so it does not run in an Rgba16Float
graph.
Fields§
§progress: f32Transition progress [0, 1]: 0 = clip A, 1 = clip B.
to_rgba: Vec<u8>Clip B as RGBA bytes (to_width × to_height × 4).
to_width: u32Width of to_rgba.
to_height: u32Height of to_rgba.
Implementations§
Trait Implementations§
Source§impl RenderNode for FadeTransitionNode
Available on crate feature wgpu only.
impl RenderNode for FadeTransitionNode
wgpu only.