#[repr(C)]pub struct WaveUniforms {Show 16 fields
pub resolution: [f32; 2],
pub time: f32,
pub mode: u32,
pub wave_x: f32,
pub wave_y: f32,
pub wave_scale: f32,
pub wave_alpha: f32,
pub wave_param: f32,
pub aspect: f32,
pub thickness: f32,
pub smoothing: f32,
pub wave_color: [f32; 4],
pub num_samples: u32,
pub is_thick: u32,
pub is_dots: u32,
pub sample_offset: u32,
}Expand description
Per-frame uniforms consumed by the waveform shader. Field order
MUST match Uniforms in waveform_advanced.wgsl.
Fields§
§resolution: [f32; 2]§time: f32§mode: u32§wave_x: f32§wave_y: f32§wave_scale: f32§wave_alpha: f32§wave_param: f32§aspect: f32§thickness: f32§smoothing: f32§wave_color: [f32; 4]§num_samples: u32§is_thick: u32§is_dots: u32§sample_offset: u32Index offset into the (now 2N-wide) sample buffer. 0 picks the
left-channel half (and the mono-fallback when no right channel
is uploaded); NUM_WAVE_SAMPLES picks the right-channel half.
The split-channel path picks left vs. right by changing this
offset between two consecutive draws at different wave_y
offsets when the top-vs-bottom L/R split is enabled.
Trait Implementations§
Source§impl Clone for WaveUniforms
impl Clone for WaveUniforms
Source§fn clone(&self) -> WaveUniforms
fn clone(&self) -> WaveUniforms
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WaveUniforms
impl Debug for WaveUniforms
Source§impl Default for WaveUniforms
impl Default for WaveUniforms
impl Copy for WaveUniforms
impl Pod for WaveUniforms
Auto Trait Implementations§
impl Freeze for WaveUniforms
impl RefUnwindSafe for WaveUniforms
impl Send for WaveUniforms
impl Sync for WaveUniforms
impl Unpin for WaveUniforms
impl UnwindSafe for WaveUniforms
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
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§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.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().