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() -> Self
Sourcepub fn effect<S: SequoiShader + Copy + 'static>(self, shader: S) -> Self
pub fn effect<S: SequoiShader + Copy + 'static>(self, shader: S) -> Self
Appends an effect that binds the shader’s first declared texture.
Sourcepub fn effect_with_blend<S: SequoiShader + Copy + 'static>(
self,
shader: S,
blend: BlendMode,
) -> Self
pub fn effect_with_blend<S: SequoiShader + Copy + 'static>( self, shader: S, blend: BlendMode, ) -> Self
Appends an effect with an explicit blend mode.
Sourcepub fn effect_to<S: SequoiShader + Copy + 'static>(
self,
shader: S,
input: &'static str,
blend: Option<BlendMode>,
) -> Self
pub fn effect_to<S: SequoiShader + Copy + 'static>( self, shader: S, input: &'static str, blend: Option<BlendMode>, ) -> Self
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
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