{
	"name": "sdroundedcross",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"cx": 0,
		"cy": 0,
		"height": 0.25,
		"width": 0.45
	},
	"seed_int": 0,
	"shader_model": {
		"code": "",
		"global": [
			"float sdRoundedCross( in vec2 p, in float h )",
			"{",
			"\tfloat k = 0.5*(h+1.0/h); // k should be const at modeling time",
			"\tp = abs(p);",
			"\treturn ( p.x<1.0 && p.y<p.x*(k-h)+h ) ? ",
			"\t\t\t k-sqrt(dot2(p-vec2(1,k)))  :",
			"\t\t   sqrt(min(dot2(p-vec2(0,h)),",
			"\t\t\t\t\tdot2(p-vec2(1,0))));",
			"}"
		],
		"inputs": [

		],
		"instance": "",
		"longdesc": "A rounded cross described as a signed distance function",
		"name": "sdRoundedCross",
		"outputs": [
			{
				"longdesc": "The rounded cross as a signed distance function",
				"sdf2d": "sdRoundedCross(($uv - 0.5 - vec2($cx, $cy)) / $width, $height / $width) * $width",
				"shortdesc": "Output",
				"type": "sdf2d"
			}
		],
		"parameters": [
			{
				"control": "Rect1.x",
				"default": 0.45,
				"label": "Width",
				"longdesc": "Width of the rounded cross",
				"max": 1,
				"min": 0,
				"name": "width",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "Rect1.y",
				"default": 0.25,
				"label": "Height",
				"longdesc": "Height of the rounded cross",
				"max": 1,
				"min": 0,
				"name": "height",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "P1.x",
				"default": 0,
				"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,
				"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": "sdRoundedCross"
	},
	"type": "shader"
}