{
	"name": "sphere",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"cx": 0.5,
		"cy": 0.5,
		"r": 0.5
	},
	"seed_int": 0,
	"shader_model": {
		"code": "",
		"global": [
			"float sphere(vec2 uv, vec2 c, float r) {",
			"\tuv -= c;",
			"\tuv /= r;",
			"\treturn 2.0*r*sqrt(max(0.0, 1.0-dot(uv, uv)));",
			"}",
			""
		],
		"inputs": [],
		"instance": "",
		"longdesc": "Generates depth of a 3D Sphere",
		"name": "Sphere",
		"outputs": [
			{
				"f": "sphere($uv, vec2($cx, $cy), $r)",
				"longdesc": "A heightmap of the specified sphere",
				"shortdesc": "Output",
				"type": "f"
			}
		],
		"parameters": [
			{
				"control": "None",
				"default": 0.5,
				"label": "Center X",
				"longdesc": "Position of the center along the X axis",
				"max": 1.0,
				"min": 0.0,
				"name": "cx",
				"shortdesc": "Center.x",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "None",
				"default": 0.5,
				"label": "Center Y",
				"longdesc": "Position of the center along the Y axis",
				"max": 1,
				"min": 0,
				"name": "cy",
				"shortdesc": "Center.y",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "None",
				"default": 0.5,
				"label": "Radius",
				"longdesc": "Radius of the sphere",
				"max": 1,
				"min": 0,
				"name": "r",
				"shortdesc": "Radius",
				"step": 0.01,
				"type": "float"
			}
		],
		"shortdesc": "Sphere"
	},
	"type": "shader"
}