{
	"name": "sdcutdisk",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"cx": 0,
		"cy": 0,
		"h": -1.1,
		"r": 0.5
	},
	"seed": 0,
	"seed_locked": false,
	"shader_model": {
		"code": "",
		"global": "float sdCutDisk( in vec2 p, in float r, in float h )\n{\n    float w = sqrt(r*r-h*h); // constant for any given shape\n    p.x = abs(p.x);\n    float s = max( (h-r)*p.x*p.x+w*w*(h+r-2.0*p.y), h*p.x-w*p.y );\n    return (s<0.0) ? length(p)-r : ((p.x<w) ? h - p.y : length(p-vec2(w,h)));\n}",
		"inputs": [

		],
		"instance": "",
		"longdesc": "A cut disk described as a signed distance function",
		"name": "sdCutDisk",
		"outputs": [
			{
				"longdesc": "The cut disk as a signed distance function",
				"sdf2d": "sdCutDisk($uv - 0.5 - vec2($cx, $cy), $r, clamp($h / 4.0, -$r, $r))",
				"shortdesc": "Output",
				"type": "sdf2d"
			}
		],
		"parameters": [
			{
				"control": "Radius1.r",
				"default": 0.5,
				"label": "Radius",
				"longdesc": "Radius of the cut disk",
				"max": 1,
				"min": 0,
				"name": "r",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "Scale1.y",
				"default": -0.5,
				"label": "Cut Height",
				"longdesc": "Position of the cut of the disk",
				"max": 1,
				"min": -1,
				"name": "h",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "P1.x",
				"default": 0.2,
				"label": "Center X",
				"longdesc": "The position of the center on the X axis",
				"max": 0.5,
				"min": -0.5,
				"name": "cx",
				"shortdesc": "Center.x",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "P1.y",
				"default": -0.25,
				"label": "Center Y",
				"longdesc": "The position of the center on the Y axis",
				"max": 0.5,
				"min": -0.5,
				"name": "cy",
				"shortdesc": "Center.y",
				"step": 0.01,
				"type": "float"
			}
		],
		"shortdesc": "sdCutDisk"
	},
	"type": "shader"
}