{
	"name": "multigradient",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"count": 10
	},
	"seed_int": 0,
	"shader_model": {
		"code": "",
		"global": [
			"float multigradient(vec2 uv, int count, float seed) {",
			"\tfloat rv = 1.0;",
			"\tfloat angle = 0.0;",
			"\tfor (int i = 0; i < count; ++i) {",
			"\t\tangle = rand(vec2(seed, angle))*6.28;",
			"\t\tfloat v = 0.5+(cos(angle)*(uv.x-0.5)+sin(angle)*(uv.y-0.5))/(cos(abs(mod(angle, 0.5*3.141592)-0.25*3.141592))*1.41421356237);",
			"\t\trv = min(rv, v);",
			"\t}",
			"\treturn rv;",
			"}"
		],
		"inputs": [
			{
				"default": "vec3($uv, 0.0)",
				"label": "",
				"name": "in",
				"type": "rgb"
			}
		],
		"instance": "",
		"name": "MultiGradient",
		"outputs": [
			{
				"f": "multigradient($in($uv).xy, int($count), float($seed)+$in($uv).z)",
				"longdesc": "An image showing the gradient",
				"shortdesc": "Output",
				"type": "f"
			}
		],
		"parameters": [
			{
				"control": "None",
				"default": 1,
				"label": "",
				"longdesc": "Number of repetitions of the gradient",
				"max": 32,
				"min": 1,
				"name": "count",
				"shortdesc": "Repeat",
				"step": 1,
				"type": "float"
			}
		]
	},
	"type": "shader"
}