{
	"name": "sdunevencapsule",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"cx": 0,
		"cy": -0.25,
		"h": 0.4,
		"r1": 0.2,
		"r2": 0.3
	},
	"seed": 0,
	"seed_locked": false,
	"shader_model": {
		"code": "",
		"global": "float sdUnevenCapsule( vec2 p, float r1, float r2, float h )\n{\n    p.x = abs(p.x);\n    float b = (r1-r2)/h;\n    float a = sqrt(1.0-b*b);\n    float k = dot(p,vec2(-b,a));\n    if( k < 0.0 ) return length(p) - r1;\n    if( k > a*h ) return length(p-vec2(0.0,h)) - r2;\n    return dot(p, vec2(a,b) ) - r1;\n}",
		"inputs": [

		],
		"instance": "",
		"longdesc": "An uneven capsule described as a signed distance function",
		"name": "sdUnevenCapsule",
		"outputs": [
			{
				"longdesc": "The uneven capsule as a signed distance function",
				"sdf2d": "sdUnevenCapsule($uv - 0.5 - vec2($cx, $cy), $r1, $r2, $h)",
				"shortdesc": "Output",
				"type": "sdf2d"
			}
		],
		"parameters": [
			{
				"control": "Rect1.y",
				"default": 0.5,
				"label": "Height",
				"longdesc": "The height of the uneven capsule",
				"max": 1,
				"min": 0,
				"name": "h",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "Rect1.x",
				"default": 0.5,
				"label": "Top Radius",
				"longdesc": "Top radius of the uneven capule",
				"max": 1,
				"min": 0,
				"name": "r2",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "Radius1.r",
				"default": 0.5,
				"label": "Bottom Radius",
				"longdesc": "Bottom radius of the uneven capsule",
				"max": 1,
				"min": 0,
				"name": "r1",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "P1.x",
				"default": 0.2,
				"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.25,
				"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": "sdUnevenCapsule"
	},
	"type": "shader"
}