roundRectSD
Signed distance to a (rounded) rectangle: emits the classic sdRoundRect q/sd pair for the centre-relative point pp against half-extent half.
roundRectSD(
names: {q: string; sd: string},
opts: {pp: string; half: string; radius?: string},
): string[]
Import effects from shaders/std and use effects.overlay.roundRectSD.
With radius omitted the radius terms are not emitted at all (a sharp box, not a zero-radius one).
Parameters
| Name | Type | Notes |
|---|---|---|
names | {q: string; sd: string} | |
opts | {pp: string; half: string; radius?: string} |