pub struct ShaderExt {
pub mouse: [f32; 4],
pub q_hi: [f32; 32],
pub time: Option<f64>,
pub fft: Option<Arc<[f32; 512]>>,
pub beatdrop: Option<Arc<BeatDropTexture>>,
pub time_date: Option<[[f32; 4]; 2]>,
pub mxd3q: [[f32; 4]; 7],
}Expand description
See the module docs. One per shader pass owner: crate::FrameInput::ext for the state the frame is built for,
crate::Md2OldPass::ext for the outgoing state of a MilkDrop 2 / 3 blend.
Fields§
§mouse: [f32; 4]_c14 = (x, y, held, released): x = px/W, y = py/H (top origin), -1, -1 outside the window.
q_hi: [f32; 32]q33..q64 (q_hi[0] == q33) of the state after its per-frame code (_qi.._qp).
time: Option<f64>What _c2.x shows instead of crate::FrameInput::time: seconds since this state’s preset started (the
renderer wraps it modulo 10000 like it does the absolute time). None = FrameInput::time.
fft: Option<Arc<[f32; 512]>>The smoothed shader FFT (sampler_fft, FFT_BINS values), uploaded to the renderer’s FFT texture before
the frame is drawn. None keeps the texture as it is (zeros until the first upload). The texture is
renderer-global: for crate::Md2OldPass::ext this field is ignored, the new state’s one is used.
beatdrop: Option<Arc<BeatDropTexture>>BeatDrop’s spectrum / waveform texture (CompatRules::md2_shader_inputs), uploaded like fft
(renderer-global, ignored for crate::Md2OldPass::ext). None keeps the texture as it is.
time_date: Option<[[f32; 4]; 2]>BeatDrop’s _c15 (hour, minute, second, totalSeconds) and _c16 (year, month, day, weekday); they travel
in the first two q_hi registers of the extension block, which nothing else uses outside MilkDrop 3.
None leaves q_hi as it is.
mxd3q: [[f32; 4]; 7]The _mxd3qxa .. _mxd3qsc audio-envelope / beat-latch float4s (the MilkDrop 3 block).