fn warp_uv_md2(
x: f32,
y: f32,
rad: f32,
m: &PerVertexMotion,
time: f32,
) -> [f32; 2]Expand description
MilkDrop 2 warp UV formula.
Operates on normalized texture coordinates (x, y) ∈ [0, 1]². The output
is the UV from which the fragment shader will sample prev_main.
Order of operations (matches butterchurn / projectM convention, which both
derive from vis_milk2):
- Logarithmic zoom around
(cx, cy), with curvature controlled byzoomexp. - Rotation around
(cx, cy)byrotradians. - Anisotropic stretch around
(cx, cy)by(sx, sy). - Translation by
(dx, dy)(subtractive —dx > 0scrolls right). - Optional sinusoidal warp displacement scaled by
warp.