pub struct RenderState {Show 16 fields
pub time: f32,
pub frame: u32,
pub progress: f32,
pub audio: AudioLevels,
pub motion: MotionParams,
pub wave: WaveParams,
pub decay: f32,
pub gamma_adj: f32,
pub echo_zoom: f32,
pub echo_alpha: f32,
pub echo_orient: u32,
pub red_blue_stereo: bool,
pub feedback: FeedbackParams,
pub borders: BorderParams,
pub motion_vectors: MotionVectorParams,
pub q_snapshot: [f32; 32],
}Expand description
Render state containing dynamic parameters.
Fields§
§time: f32Current time in seconds
frame: u32Current frame number
progress: f32MD2 progress — [0, 1] position within the current preset’s
display window. 0.0 at preset load, ramps to 1.0 just
before the next hard cut. Presets read it for once-per-display
effects (slow fade-ins, build-ups before the next cut, intro
flashes). Forwarded into the comp/warp uniforms.progress field
each frame so user shaders see the canonical MD2 value.
audio: AudioLevelsAudio levels (bass, mid, treble)
motion: MotionParamsMotion parameters
wave: WaveParamsWave parameters
decay: f32Frame-buffer decay multiplier applied during the warp pass. Typical Milkdrop range: ~0.5 (very fast fade) to 1.0 (no fade).
gamma_adj: f32Display-time brightness multiplier applied in the comp pass
(f_gamma_adj in the MD2 spec). MilkDrop default is 2.0; not a true
gamma exponent — a flat multiplier.
echo_zoom: f32MilkDrop’s f_video_echo_zoom. Scales the UV around 0.5 before
sampling the previous frame for the comp pass’s echo blend.
1.0 = same scale as current (passthrough sample).
echo_alpha: f32MilkDrop’s f_video_echo_alpha. Mix weight between current frame
(0.0) and echoed previous frame (1.0). Default 0.0 → echo
off entirely.
echo_orient: u32MilkDrop’s n_video_echo_orientation. 0 = no flip, 1 = flip X,
2 = flip Y, 3 = flip both.
red_blue_stereo: boolMilkDrop’s b_red_blue_stereo. When true the comp pass produces an
anaglyph red/cyan split — display-only, never enters the feedback
loop. Typically set once at preset load, but per-frame eqs may
flip it (mirrors darken_center semantics).
feedback: FeedbackParamsFeedback filter toggles (b_invert / b_brighten / etc.).
borders: BorderParamsOuter + inner border draws. The renderer trims the frame edges into two coloured rings; both contribute to the feedback loop so a high-decay preset trails them inward.
motion_vectors: MotionVectorParamsMotion-vector grid. A n_x × n_y grid of short line segments
drawn into the warp output; over successive frames the feedback
pulls them into trails that visualise the motion field.
q_snapshot: [f32; 32]Snapshot of q1..q32 after the current frame’s per-frame phase.
Forwarded to the comp pass so user comp shaders can read the same
q-channel state per-frame equations wrote.
Trait Implementations§
Source§impl Clone for RenderState
impl Clone for RenderState
Source§fn clone(&self) -> RenderState
fn clone(&self) -> RenderState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RenderState
impl Debug for RenderState
Source§impl Default for RenderState
impl Default for RenderState
Source§fn default() -> RenderState
fn default() -> RenderState
impl Copy for RenderState
Auto Trait Implementations§
impl Freeze for RenderState
impl RefUnwindSafe for RenderState
impl Send for RenderState
impl Sync for RenderState
impl Unpin for RenderState
impl UnwindSafe for RenderState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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>
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>
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>
ReadEndian::read_from_little_endian().