{
	"name": "sdisoscelestriangle",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"cx": 0.0,
		"cy": 0.2,
		"height": 0.2,
		"width": 0.4
	},
	"seed_int": 0,
	"shader_model": {
		"code": "",
		"global": [
			"float sd_isosceles_triangle(vec2 uv, vec2 size)",
			"{",
			"\tuv.x = abs(uv.x);",
			"\tuv.y += size.y; size.y *= 2.0;",
			"\tvec2 a = uv - size*clamp(dot(uv,size)/dot(size,size), 0.0, 1.0);",
			"\tvec2 b = uv - size*vec2(clamp(uv.x/size.x, 0.0, 1.0), 1.0);",
			"\tfloat s = -sign(size.y);",
			"\tvec2 d = min(vec2(dot(a,a), s*(uv.x*size.y-uv.y*size.x)),",
			"\t\t\t\t vec2(dot(b,b), s*(uv.y-size.y)));",
			"\treturn -sqrt(d.x)*sign(d.y);",
			"}"
		],
		"inputs": [

		],
		"instance": "",
		"longdesc": "An Isosceles Triangle described as a signed distance function",
		"name": "sdIsoscelesTriangle",
		"outputs": [
			{
				"longdesc": "The isosceles triangle as a signed distance function",
				"sdf2d": "sd_isosceles_triangle($uv - 0.5 + vec2(0.0, $height) - vec2($cx, $cy), vec2($width, $height * 2.0))",
				"shortdesc": "Output",
				"type": "sdf2d"
			}
		],
		"parameters": [
			{
				"control": "Rect1.x",
				"default": 0.5,
				"label": "Width",
				"longdesc": "Width of the isosceles triangle",
				"max": 1,
				"min": 0,
				"name": "width",
				"shortdesc": "Width",
				"step": 0.01,
				"type": "float"
			},
			{
				"control": "Rect1.y",
				"default": 0.5,
				"label": "Height",
				"longdesc": "Height of the isosceles triangle",
				"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": "sdIsoscelesTriangle"
	},
	"type": "shader"
}