Expand description
Main waveform of MilkDrop 3 (3.37): the 17 modes 0..=16 (docs/md3.md, “Main waveform”).
MD3 keeps the BeatDrop DrawWave structure (per-pass set-up, blend of the old and the new mode, colour,
SmoothWave, thick / dots passes) and differs in the modes themselves: every formula reads one channel (like the
original MilkDrop 2 and unlike BeatDrop, which averages left and right), mode 14 really halves rad and ang,
mode 13 reads past the end of the right channel into the spectrum, mode 16 is BeatDrop’s triangle spinning the other
way, and BeatDrop’s mode 17 does not exist. The shared tail (WaveGeom consumers in the renderer) is the MD2 one.
Output convention as in crate::wavegen: clip space, x right, y up, before SmoothWave.
Constants§
- MD3_
NUM_ WAVES NUM_WAVESof MilkDrop 3: valid modes are0..=16; the drawn mode is(int)wave_mode % 17.
Functions§
- main_
wave_ geometry_ md3_ raw - One pass of MD3’s
DrawWaveloop: the vertices and the alpha of the wave numbermw.modebefore the “alpha < 0.004” test (which applies to the possibly blended result). - md3_
wave_ mode - The mode MilkDrop 3 draws for the per-frame variable
wave_mode: C truncation toint(cvttsd2si: NaN and out-of-range values giveINT_MIN), then the C remainder by 17, which keeps the sign of the dividend. A negative result is not a mode:main_wave_geometry_md3_rawthen yields 480 zero vertices.