#[repr(C, align(16))]pub struct GpuDropShadow {
pub header: u32,
pub center_weight: f32,
pub linear_weights: [f32; 3],
pub linear_offsets: [f32; 3],
pub dx: f32,
pub dy: f32,
pub color: u32,
pub _padding: [u32; 1],
}Expand description
A drop shadow’s parameter block, as the fragment stage reads it.
header, center_weight, linear_weights and linear_offsets sit at the
same offsets crate::filters::blur::GpuGaussianBlur gives them, so the
blur passes of a shadow’s own sequence read this block through the exact
accessors a plain blur’s does; dx, dy and color are what a blur’s own
block leaves as padding, and only the offset and colourize passes this
module adds ever read them.
Fields§
§header: u32Packed filter kind, edge mode, decimation count and tap count — the composite-original bit is never set, since this engine serves only the shadow-only shape.
center_weight: f32Weight of the kernel’s centre tap.
linear_weights: [f32; 3]Merged weight of each bilinear tap pair.
linear_offsets: [f32; 3]Fractional offset of each bilinear tap pair.
dx: f32Horizontal device-space offset of the shadow.
dy: f32Vertical device-space offset of the shadow.
color: u32The shadow’s own premultiplied colour, packed as RGBA8.
_padding: [u32; 1]Unused; present so every filter kind is one stride wide.
Trait Implementations§
Source§impl Clone for GpuDropShadow
impl Clone for GpuDropShadow
impl Copy for GpuDropShadow
Source§impl Debug for GpuDropShadow
impl Debug for GpuDropShadow
Source§impl From<&DropShadow> for GpuDropShadow
impl From<&DropShadow> for GpuDropShadow
Source§fn from(shadow: &DropShadow) -> Self
fn from(shadow: &DropShadow) -> Self
Source§impl From<GpuDropShadow> for GpuFilterData
impl From<GpuDropShadow> for GpuFilterData
Source§fn from(shadow: GpuDropShadow) -> Self
fn from(shadow: GpuDropShadow) -> Self
Source§impl PartialEq for GpuDropShadow
impl PartialEq for GpuDropShadow
impl Pod for GpuDropShadow
impl StructuralPartialEq for GpuDropShadow
Auto Trait Implementations§
impl Freeze for GpuDropShadow
impl RefUnwindSafe for GpuDropShadow
impl Send for GpuDropShadow
impl Sync for GpuDropShadow
impl Unpin for GpuDropShadow
impl UnsafeUnpin for GpuDropShadow
impl UnwindSafe for GpuDropShadow
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.