{
	"name": "sdhexagram",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"cx": 0.0,
		"cy": 0.0,
		"r": 0.2
	},
	"seed": 0,
	"seed_locked": false,
	"shader_model": {
		"code": "",
		"global": "float sdHexagram( in vec2 p, in float r )\n{\n    const vec4 k = vec4(-0.5,0.8660254038,0.5773502692,1.7320508076);\n    p = abs(p);\n    p -= 2.0*min(dot(k.xy,p),0.0)*k.xy;\n    p -= 2.0*min(dot(k.yx,p),0.0)*k.yx;\n    p -= vec2(clamp(p.x,r*k.z,r*k.w),r);\n    return length(p)*sign(p.y);\n}",
		"inputs": [

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