SDF Squircle

SDF Squircle

SDF Squircle Node

Inputs

float Radius | default 0.5
float Roundness | default 0.2

Behaviour

Outputs the signed distance field for a Squircle, based on the provided Radius. Roundness determines how much the corners are rounded but keeps the sdf radius the same. Roundness is only well defined between 0- 1, values above 1 lead to collapse of the corners to the inside.

SDF Output