GLSL_SDF_ROUNDED_BOX
constGLSL_SDF_ROUNDED_BOX: ā\nfloat sdfRoundedBox(vec2 p, vec2 halfSize, float radius) {\n vec2 d = abs(p) - halfSize + radius;\n return length(max(d, 0.0)) + min(max(d.x, d.y), 0.0) - radius;\n}\nā
Defined in: packages/sigma/src/rendering/glsl.ts:93
SDF for an axis-aligned rounded box. Shrinks box by radius, computes box SDF, subtracts radius. When radius=0, equivalent to sdfBox.