{
	"name": "sdequilateraltriangle",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"cx": 0.0,
		"cy": 0.0,
		"r": 0.4
	},
	"seed": 0,
	"seed_locked": false,
	"shader_model": {
		"code": "",
		"global": "float sdEquilateralTriangle( in vec2 p )\n{\n    float k = sqrt(3.0);\n    p.x = abs(p.x) - 1.0;\n    p.y = -p.y + 1.0/k;\n    if( p.x+k*p.y>0.0 ) p = vec2(p.x-k*p.y,-k*p.x-p.y)/2.0;\n    p.x -= clamp( p.x, -2.0, 0.0 );\n    return -length(p)*sign(p.y);\n}",
		"inputs": [

		],
		"instance": "",
		"longdesc": "An equilateral triangle described as a signed distance function",
		"name": "sdEquilateralTriangle",
		"outputs": [
			{
				"longdesc": "The equilateral triangle as a signed distance function",
				"sdf2d": "sdEquilateralTriangle(($uv - 0.5 - vec2($cx, $cy)) / $r) * $r",
				"shortdesc": "Output",
				"type": "sdf2d"
			}
		],
		"parameters": [
			{
				"control": "Radius1.r",
				"default": 0.5,
				"label": "Radius",
				"longdesc": "Radius of the equilateral triangle",
				"max": 1,
				"min": 0,
				"name": "r",
				"shortdesc": "Radius",
				"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": "sdEquilateralTriangle"
	},
	"type": "shader"
}