pub struct FrameInput {Show 28 fields
pub time: f64,
pub fps: f32,
pub frame: u32,
pub progress: f32,
pub bass: f32,
pub mid: f32,
pub treb: f32,
pub bass_att: f32,
pub mid_att: f32,
pub treb_att: f32,
pub imm_abs: [f32; 3],
pub q: [f32; 32],
pub rand_frame: [f32; 4],
pub rand_preset: [f32; 4],
pub warp_uv: Option<Vec<[f32; 2]>>,
pub warp_gpu: Option<WarpGpu>,
pub post: PostParams,
pub blur: BlurParams,
pub borders: Borders,
pub mv: MotionVectors,
pub main_wave: MainWave,
pub shapes: Vec<ShapeInstance>,
pub waves: Vec<CustomWave>,
pub darken_center: bool,
pub warp_random: Option<PassRandom>,
pub comp_random: Option<PassRandom>,
pub hue_offsets: Option<[f32; 4]>,
pub md2_blend: Option<Md2Blend>,
}Expand description
Per-frame values after per-frame equations.
Fields§
§time: f64GetTime() (== time var, _c2.x). Frame n is exactly n / fps.
fps: f32GetFps() (fps, _c2.y).
frame: u32GetFrame() (frame, _c2.z).
progress: f32progress (_c2.w): (time - preset_start) / (next_preset_time - preset_start).
bass: f32mysound.imm_rel[0..3] = bass, mid, treb (_c3.xyz).
mid: f32mysound.imm_rel[1] = mid.
treb: f32mysound.imm_rel[2] = treb.
bass_att: f32mysound.avg_rel[0..3] = bass_att, mid_att, treb_att (_c4.xyz).
mid_att: f32mysound.avg_rel[1] = mid_att.
treb_att: f32mysound.avg_rel[2] = treb_att.
imm_abs: [f32; 3]mysound.imm[0..3] (absolute, un-normalised). Only used by main-wave mode 3
(alpha *= pow(treble_rel, 2) where MD2 reads mysound.imm[2]).
q: [f32; 32]q1..q32 after per-frame code (_qa.._qh).
rand_frame: [f32; 4]m_rand_frame (rand_frame): four FRANDs drawn once per frame.
rand_preset: [f32; 4]m_pState->m_rand_preset (rand_preset): four FRANDs drawn once per preset.
warp_uv: Option<Vec<[f32; 2]>>Final UV of every warp-mesh vertex, (gx+1)*(gy+1) entries, row 0 first (clip y = -1); a different length
is rejected by Renderer::render_frame. Build with crate::warp_mesh.
None = no motion (zoom 1, no warp). The UVs are also what the next frame’s motion vectors read, and what
the MilkDrop 2 compat paths draw.
warp_gpu: Option<WarpGpu>Per-vertex inputs of projectM’s warp vertex shader: with Compat::ProjectM the renderer lets the
GPU evaluate the warp UV formula (pow/sin/cos are GPU approximations, not libm, so the
result is only reproducible on the GPU) from these instead of using warp_uv. None = use warp_uv.
post: PostParamsDecay and composite-pass controls.
blur: BlurParamsBlur-chain parameters.
borders: BordersOuter / inner borders.
mv: MotionVectorsMotion-vector field.
main_wave: MainWaveMain waveform.
shapes: Vec<ShapeInstance>Custom shapes in draw order (m_shape[0..16], each instance already evaluated).
waves: Vec<CustomWave>Custom waves in draw order (m_wave[0..16], per-point equations already evaluated).
darken_center: boolvar_pf_darken_center.
warp_random: Option<PassRandom>Random state of the warp / composite shader pass (override of rand_frame / rand_preset
above and of the renderer’s rotation matrices); None = use the fields above.
comp_random: Option<PassRandom>Random state of the composite shader pass, see warp_random.
hue_offsets: Option<[f32; 4]>Phases of the four hue-shader corner colours (m_fRandStart / projectM hueRandomOffsets);
None = the renderer’s per-preset values.
md2_blend: Option<Md2Blend>MilkDrop 2’s preset blend (m_bBlending) in progress (CompatRules::md2_preset_blend): the fields above are
then the new state’s blended values and this carries the rest, see Md2Blend. None = no blend.