segment_to_thick_quad

Function segment_to_thick_quad 

Source
pub fn segment_to_thick_quad(
    ax: f64,
    ay: f64,
    color_a: [f32; 4],
    bx: f64,
    by: f64,
    color_b: [f32; 4],
    thickness_clip: f32,
) -> [CustomWaveVertex; 6]
Expand description

Expand two consecutive per-point outputs into a thick-line segment quad — six clip-space vertices forming a screen-space rectangle of thickness_clip perpendicular to the segment direction. Mirrors the line_vertex shape used by waveform_advanced.wgsl for b_wave_thick, so MD2’s “thick custom-wave trail” looks identical to the thick-static-wave path.

color_a / color_b come from the two source points so the segment gracefully interpolates colour along a fading per-point trail. Caller supplies (x, y) in MD2 preset space; we convert internally.