Skip to main content

Circle

Code Example

float circleSDF(vec3 p, float r) {
        float l = length(p.xy) - r;
	return l < 0. ? abs(p.z) : length(vec2(p.z, l));
}