pub struct LumaMaskNode { /* private fields */ }Expand description
Mask inputs[0] using the BT.709 luma of the source frame (inputs[1]).
The luma (0.0–1.0) is multiplied into the base alpha channel. The source frame is sampled per frame rather than baked into the node (#1710), which is what lets an effect graph containing this node be cached across frames.
Implementations§
Trait Implementations§
Source§impl RenderNode for LumaMaskNode
Available on crate feature wgpu only.
impl RenderNode for LumaMaskNode
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 LumaMaskNode
impl RenderNodeCpu for LumaMaskNode
Source§fn process_cpu(&self, rgba: &mut [u8], _w: u32, _h: u32)
fn process_cpu(&self, rgba: &mut [u8], _w: u32, _h: u32)
Masks by the luma of the buffer it is given.
That buffer is the previous node’s output, where the GPU path uses the
original source frame. The two agree when this node is first in the graph;
an effect in front of it makes them differ. The compositor drives only the GPU
path, and its own divergence from the CPU geq in that position is a known v1
limitation (see avio::gpu_compositor’s LumaMask arm).
Auto Trait Implementations§
impl !Freeze for LumaMaskNode
impl !RefUnwindSafe for LumaMaskNode
impl !UnwindSafe for LumaMaskNode
impl Send for LumaMaskNode
impl Sync for LumaMaskNode
impl Unpin for LumaMaskNode
impl UnsafeUnpin for LumaMaskNode
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