{
	"name": "sdcross",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"bx": 0.5,
		"by": 0.15,
		"cx": 0.0,
		"cy": 0.0,
		"r": 0.15
	},
	"seed": 0,
	"seed_locked": false,
	"shader_model": {
		"code": "",
		"global": "float sdCross( in vec2 p, in vec2 b, float r ) \n{\n    p = abs(p); p = (p.y>p.x) ? p.yx : p.xy;\n    vec2  q = p - b;\n    float k = max(q.y,q.x);\n    vec2  w = (k>0.0) ? q : vec2(b.y-p.x,-k);\n    return sign(k)*length(max(w,0.0)) + r;\n}",
		"inputs": [

		],
		"instance": "",
		"longdesc": "A cross described as a signed distance function",
		"name": "sdCross",
		"outputs": [
			{
				"longdesc": "The cross as a signed distance function",
				"sdf2d": "sdCross($uv - 0.5 - vec2($cx, $cy), vec2($bx, $by) + $r, $r)",
				"shortdesc": "Output",
				"type": "sdf2d"
			}
		],
		"parameters": [
			{
				"control": "Radius1.r",
				"default": 0.15,
				"label": "Radius",
				"longdesc": "Radius of the cross",
				"max": 1,
				"min": 0,
				"name": "r",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "Rect1.x",
				"default": 0.5,
				"label": "Width",
				"longdesc": "Width of the cross",
				"max": 1,
				"min": 0,
				"name": "bx",
				"step": 0.1,
				"type": "float"
			},
			{
				"control": "Rect1.y",
				"default": 0.15,
				"label": "Height",
				"longdesc": "Height of the cross",
				"max": 1,
				"min": 0,
				"name": "by",
				"step": 0.1,
				"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": "sdCross"
	},
	"type": "shader"
}