pub struct BeatDropTexture {
pub spectrum: [f32; 1024],
pub peak: [f32; 1024],
pub wave: [[f32; 480]; 2],
}Expand description
BeatDrop’s two shader textures, both R32F with two rows (plugin.cpp, m_lpFFTTexture / m_lpWaveTexture,
refilled every frame by DoCustomSoundAnalysis): sampler_fft is BEATDROP_FFT_BINS x 2 (row 0 the smoothed
spectrum, row 1 the peak hold) and sampler_wave BEATDROP_WAVE_SAMPLES x 2 (row 0 left, row 1 right, the
waveform divided by 128). The renderer keeps them as two textures of their own.
Fields§
§spectrum: [f32; 1024]Row 0 of sampler_fft: m_fFFTSmoothed.
peak: [f32; 1024]Row 1 of sampler_fft: m_fFFTPeak.
wave: [[f32; 480]; 2]Rows 0 (left) and 1 (right) of sampler_wave.
Implementations§
Source§impl BeatDropTexture
impl BeatDropTexture
Sourcepub fn texels(&self) -> Vec<f32>
pub fn texels(&self) -> Vec<f32>
The texels in upload order: the two rows of sampler_fft (BEATDROP_FFT_BINS each), then the two rows of
sampler_wave (BEATDROP_WAVE_SAMPLES each): 2 * (BEATDROP_FFT_BINS + BEATDROP_WAVE_SAMPLES) floats.
Trait Implementations§
Source§impl Clone for BeatDropTexture
impl Clone for BeatDropTexture
Source§impl Debug for BeatDropTexture
impl Debug for BeatDropTexture
Source§impl PartialEq for BeatDropTexture
impl PartialEq for BeatDropTexture
impl StructuralPartialEq for BeatDropTexture
Auto Trait Implementations§
impl Freeze for BeatDropTexture
impl RefUnwindSafe for BeatDropTexture
impl Send for BeatDropTexture
impl Sync for BeatDropTexture
impl Unpin for BeatDropTexture
impl UnsafeUnpin for BeatDropTexture
impl UnwindSafe for BeatDropTexture
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