SDF Chamfered Rectangle

SDF Chamfered Rectangle

SDF Chamfered Rectangle Node

Inputs

float2 Extents | default float2(0.3, 0.5)
float Chamfer | default 0.1

Behaviour

Outputs the signed distance field for a chamfered rectangle, based on the provided extents.
Extents is the total size of the resulting rectangle.
Chamfer is given as a percentage of the side length. A chamfer of 0.5 will result in a diamond shape.

SDF Output