Skip to main content

sdf_rounded_rect

Function sdf_rounded_rect 

Source
pub fn sdf_rounded_rect(p: Point, half_size: (f32, f32), radii: [f32; 4]) -> f32
Expand description

Signed distance to a rounded box centered at the origin.

radii is ordered exactly like the WGSL vec4: top-left, top-right, bottom-left, bottom-right.