pub struct BlendModeNode {
pub mode: BlendMode,
pub opacity: f32,
pub overlay_rgba: Vec<u8>,
pub overlay_width: u32,
pub overlay_height: u32,
/* private fields */
}Expand description
Apply a Photoshop-compatible blend mode to two input textures.
input_count() = 2 — inputs[0] is the base layer, inputs[1] is the
overlay. The opacity field attenuates the overlay’s contribution.
For the CPU path the overlay data must be stored in overlay_rgba.
Fields§
§mode: BlendModeBlend algorithm.
opacity: f32Overlay opacity (0.0 = invisible, 1.0 = fully applied).
overlay_rgba: Vec<u8>Overlay frame as RGBA bytes (required for CPU path).
overlay_width: u32Width of overlay_rgba.
overlay_height: u32Height of overlay_rgba.
Implementations§
Trait Implementations§
Source§impl RenderNode for BlendModeNode
Available on crate feature wgpu only.
impl RenderNode for BlendModeNode
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 BlendModeNode
impl RenderNodeCpu for BlendModeNode
Auto Trait Implementations§
impl !Freeze for BlendModeNode
impl !RefUnwindSafe for BlendModeNode
impl !UnwindSafe for BlendModeNode
impl Send for BlendModeNode
impl Sync for BlendModeNode
impl Unpin for BlendModeNode
impl UnsafeUnpin for BlendModeNode
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