pub struct ShaderChain { /* private fields */ }Expand description
An ordered list of shader effects applied to captured content.
Each pass receives the previous pass output as a texture target. A pass that is not registered is skipped and its input is forwarded to the next pass. If the final pass is missing, the captured layer is blitted back unchanged, so a missing optional effect degrades instead of blanking the layer.
Implementations§
Source§impl ShaderChain
impl ShaderChain
pub fn new() -> ShaderChain
Sourcepub fn effect<S>(self, shader: S) -> ShaderChainwhere
S: SequoiShader + Copy + 'static,
pub fn effect<S>(self, shader: S) -> ShaderChainwhere
S: SequoiShader + Copy + 'static,
Appends an effect that binds the shader’s first declared texture.
Sourcepub fn effect_with_blend<S>(self, shader: S, blend: BlendMode) -> ShaderChainwhere
S: SequoiShader + Copy + 'static,
pub fn effect_with_blend<S>(self, shader: S, blend: BlendMode) -> ShaderChainwhere
S: SequoiShader + Copy + 'static,
Appends an effect with an explicit blend mode.
Sourcepub fn effect_to<S>(
self,
shader: S,
input: &'static str,
blend: Option<BlendMode>,
) -> ShaderChainwhere
S: SequoiShader + Copy + 'static,
pub fn effect_to<S>(
self,
shader: S,
input: &'static str,
blend: Option<BlendMode>,
) -> ShaderChainwhere
S: SequoiShader + Copy + 'static,
Appends an effect that binds input to a named texture parameter.
Sourcepub fn extend(&mut self, other: ShaderChain)
pub fn extend(&mut self, other: ShaderChain)
Appends every pass from other after the current ones.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for ShaderChain
impl Clone for ShaderChain
Source§fn clone(&self) -> ShaderChain
fn clone(&self) -> ShaderChain
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for ShaderChain
impl Default for ShaderChain
Source§fn default() -> ShaderChain
fn default() -> ShaderChain
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ShaderChain
impl !Send for ShaderChain
impl !Sync for ShaderChain
impl !UnwindSafe for ShaderChain
impl Freeze for ShaderChain
impl Unpin for ShaderChain
impl UnsafeUnpin for ShaderChain
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