pub struct MotionBlurNode {
pub sub_frames: u8,
/* private fields */
}Expand description
GPU-native motion blur via exponential-decay accumulation.
Each frame the node blends the current frame with a persistent accumulation of
the previous output: out = mix(current, prev, prev_weight), then keeps out
as the next frame’s prev. prev_weight grows with shutter_angle
(0 = no blur, 180 = standard film blur) and sub_frames (2–8; more = more
persistence, i.e. a smoother/longer trail). The node is stateful: the trail
builds up only across successive process / process_cpu calls on the same
node instance (a fresh node per frame never accumulates).
Fields§
§sub_frames: u8Accumulated sub-frame count (clamped to 2..=8); higher = smoother trail.
Implementations§
Trait Implementations§
Source§impl RenderNode for MotionBlurNode
Available on crate feature wgpu only.
impl RenderNode for MotionBlurNode
wgpu only.Source§fn set_param(&self, param: NodeParam) -> bool
fn set_param(&self, param: NodeParam) -> bool
Takes NodeParam::MotionBlurShutter,
so an animated shutter reaches the live node and the accumulated trail
survives the change.