pub struct Mask { /* private fields */ }Implementations§
Trait Implementations§
impl Copy for Mask
Source§impl ShaderEffect for Mask
impl ShaderEffect for Mask
const WGSL: &'static str = fn effect(in: EffectInput) -> vec4<f32> { let options = param(0); let geometry = param(1); var along = 0.0; if (options.x < 0.5) { let axis = (geometry.zw - geometry.xy) * in.size; let offset = (in.uv - geometry.xy) * in.size; along = dot(offset, axis) / max(dot(axis, axis), 1e-6); } else if (options.x < 1.5) { let reach = max(geometry.z * min(in.size.x, in.size.y), 1e-6); along = length((in.uv - geometry.xy) * in.size) / reach; } else { along = 1.0 - in.coverage; } let span = max(options.w - options.z, 1e-6); var alpha = 1.0 - clamp((along - options.z) / span, 0.0, 1.0); if (options.y > 0.5) { alpha = 1.0 - alpha; } return sample_content(in.local) * alpha; }
const INPUTS: Inputs = Inputs::CONTENT
fn uniforms(&self, uniforms: &mut [f32; 16])
const CLOCK: Option<usize> = None
fn margin(&self) -> f32
fn content_blur(&self) -> f32
fn backdrop_blur(&self) -> f32
fn backdrop_reach(&self) -> Option<f32>
impl StructuralPartialEq for Mask
Auto Trait Implementations§
impl Forget for Mask
impl Freeze for Mask
impl Move for Mask
impl RefUnwindSafe for Mask
impl Send for Mask
impl Sync for Mask
impl Unpin for Mask
impl UnsafeUnpin for Mask
impl UnwindSafe for Mask
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