{
	"name": "sdbox",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"cx": 0,
		"cy": 0,
		"h": 0.2,
		"w": 0.3
	},
	"seed_int": 0,
	"shader_model": {
		"code": "",
		"global": [
			"float sd_box(vec2 uv, vec2 size) {",
			"\tvec2 d = abs(uv)-size;",
			"\treturn length(max(d, vec2(0)))+min(max(d.x, d.y), 0.0);",
			"}"
		],
		"inputs": [

		],
		"instance": "",
		"longdesc": "A rectangle described as a signed distance function",
		"name": "sdBox",
		"outputs": [
			{
				"longdesc": "The generated signed distance function",
				"sdf2d": "sd_box($uv-vec2($cx+0.5, $cy+0.5), vec2($w, $h))",
				"shortdesc": "Output",
				"type": "sdf2d"
			}
		],
		"parameters": [
			{
				"control": "Rect1.x",
				"default": 0.5,
				"label": "Width",
				"longdesc": "The width of the box",
				"max": 1,
				"min": 0,
				"name": "w",
				"shortdesc": "Width",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "Rect1.y",
				"default": 1,
				"label": "Height",
				"longdesc": "The height of the box",
				"max": 1,
				"min": 0,
				"name": "h",
				"shortdesc": "Height",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "P1.x",
				"default": 0,
				"label": "Center X",
				"longdesc": "The position of the center of the box on the X axis",
				"max": 1,
				"min": -1,
				"name": "cx",
				"shortdesc": "Center.x",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "P1.y",
				"default": 0,
				"label": "Center Y",
				"longdesc": "The position of the center of the box on the Y axis",
				"max": 1,
				"min": -1,
				"name": "cy",
				"shortdesc": "Center.y",
				"step": 0.01,
				"type": "float"
			}
		],
		"shortdesc": "sdBox"
	},
	"type": "shader"
}