{
	"name": "sdf3d_cylinder",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"axis": 1,
		"l": 0.25,
		"r": 0.25
	},
	"shader_model": {
		"code": "vec2 $(name_uv)_d = abs(vec2($axis)) - vec2($r,$l);\n",
		"global": "",
		"inputs": [

		],
		"instance": "",
		"longdesc": "Generates a cylinder as a signed distance function",
		"name": "Cylinder",
		"outputs": [
			{
				"longdesc": "Shows the cylinder",
				"sdf3d": "min(max($(name_uv)_d.x,$(name_uv)_d.y),0.0) + length(max($(name_uv)_d,0.0))",
				"shortdesc": "Output",
				"type": "sdf3d"
			}
		],
		"parameters": [
			{
				"default": 1,
				"label": "Axis",
				"longdesc": "The axis of the cylinder",
				"name": "axis",
				"shortdesc": "Axis",
				"type": "enum",
				"values": [
					{
						"name": "X",
						"value": "length($uv.yz),$uv.x"
					},
					{
						"name": "Y",
						"value": "length($uv.xz),$uv.y"
					},
					{
						"name": "Z",
						"value": "length($uv.xy),$uv.z"
					}
				]
			},
			{
				"control": "Rect1.y",
				"default": 0.5,
				"label": "Length",
				"longdesc": "The length of the cylinder",
				"max": 1,
				"min": 0,
				"name": "l",
				"shortdesc": "Length",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "Rect1.x",
				"default": 0.2,
				"label": "Radius",
				"longdesc": "The radius of the cylinder",
				"max": 1,
				"min": 0,
				"name": "r",
				"shortdesc": "Radius",
				"step": 0.01,
				"type": "float"
			}
		],
		"shortdesc": "Cylinder"
	},
	"type": "shader"
}