{
	"name": "sdcirclerepeat",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"c": 6
	},
	"shader_model": {
		"code": "",
		"global": "vec2 circle_repeat_transform_2d(vec2 p, float count) {\n\tfloat r = 6.28/count;\n\tfloat pa = atan(p.x, p.y);\n\tfloat a = mod(pa+0.5*r, r)-0.5*r;\n\tvec2 rv;\n\tfloat c = cos(a-pa);\n\tfloat s = sin(a-pa);\n\trv.x = p.x*c+p.y*s;\n\trv.y = -p.x*s+p.y*c;\n\treturn rv;\n}\n",
		"inputs": [
			{
				"default": "0.0",
				"label": "",
				"longdesc": "The input shape, defined as a signed distance function",
				"name": "in",
				"shortdesc": "Input",
				"type": "sdf2d"
			}
		],
		"instance": "",
		"longdesc": "Repeats its input shape around a circle",
		"name": "Circle Repeat",
		"outputs": [
			{
				"longdesc": "The shape generated by the repeat operation",
				"sdf2d": "$in(circle_repeat_transform_2d($uv-vec2(0.5), $c)+vec2(0.5))",
				"shortdesc": "Output",
				"type": "sdf2d"
			}
		],
		"parameters": [
			{
				"control": "None",
				"default": 4,
				"label": "",
				"longdesc": "The number of repetitions of the input shape around the circle",
				"max": 32,
				"min": 1,
				"name": "c",
				"shortdesc": "Count",
				"step": 1,
				"type": "float"
			}
		],
		"shortdesc": "Circle Repeat"
	},
	"type": "shader"
}