{
	"name": "sdmoon",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"cx": 0.0,
		"cy": 0.0,
		"d": 0.2,
		"ra": 0.45,
		"rb": 0.35
	},
	"seed": 0,
	"seed_locked": false,
	"shader_model": {
		"code": "",
		"global": "float sdMoon(vec2 p, float d, float ra, float rb )\n{\n    p.y = abs(p.y);\n    float a = (ra*ra - rb*rb + d*d)/(2.0*d);\n    float b = sqrt(max(ra*ra-a*a,0.0));\n    if( d*(p.x*b-p.y*a) > d*d*max(b-p.y,0.0) )\n          return length(p-vec2(a,b));\n    return max( (length(p          )-ra),\n               -(length(p-vec2(d,0))-rb));\n}",
		"inputs": [

		],
		"instance": "",
		"longdesc": "A moon described as a signed distance function",
		"name": "sdMoon",
		"outputs": [
			{
				"longdesc": "The moon as a signed distance function",
				"sdf2d": "sdMoon($uv - 0.5 - vec2($cx, $cy), $d, $ra, $rb)",
				"shortdesc": "Output",
				"type": "sdf2d"
			}
		],
		"parameters": [
			{
				"control": "Rect1.y",
				"default": 0.6,
				"label": "Radius",
				"longdesc": "Radius of the moon",
				"max": 1,
				"min": 0,
				"name": "ra",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "Radius11.r",
				"default": 0.5,
				"label": "Inner Radius",
				"longdesc": "Radius of the inner circle",
				"max": 1,
				"min": 0,
				"name": "rb",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "Radius1.r",
				"default": 0.4,
				"label": "Distance",
				"longdesc": "Distance of the inner circle away from the origin",
				"max": 1,
				"min": 0,
				"name": "d",
				"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": "sdMoon"
	},
	"type": "shader"
}