Skip to main content

evaluate_smooth_minimum_sdf

Function evaluate_smooth_minimum_sdf 

pub fn evaluate_smooth_minimum_sdf(d1: f32, d2: f32, blend_radius: f32) -> f32
Expand description

Polynomial smooth-minimum blending (SDF implicit fillet) between two distances $d_1$ and $d_2$: $smin(d_1, d_2, r) = \min(d_1, d_2) - \frac{h^2}{4r}$ where $h = \max(r - |d_1 - d_2|, 0)$.