{
	"name": "spiral_gradient",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"amount": 1.0,
		"gradient": {
			"interpolation": 1,
			"points": [
				{
					"a": 1.0,
					"b": 0.0,
					"g": 0.0,
					"pos": 0.0,
					"r": 0.0
				},
				{
					"a": 1.0,
					"b": 1.0,
					"g": 1.0,
					"pos": 1.0,
					"r": 1.0
				}
			],
			"type": "Gradient"
		},
		"mirror": false,
		"perspective": 0.3,
		"use_perspective": true
	},
	"seed_int": 0,
	"shader_model": {
		"code": [
			"vec2 position_$(name_uv) = $uv - 0.5;",
			"float length_$(name_uv) = length(position_$(name_uv));",
			"float spiral_$(name_uv) = (1.0 + sin(($use_perspective ? (($perspective * 6.0) / length_$(name_uv)) : (length_$(name_uv) / ($perspective / 6.0))) + (circular_gradient(position_$(name_uv)) * 6.28318530718 * $amount))) / 2.0;"
		],
		"global": [
			"float circular_gradient(vec2 uv) {",
			"  return fract(0.15915494309 * atan(uv.x, uv.y));",
			"}"
		],
		"inputs": [],
		"instance": "",
		"name": "Spiral Gradient",
		"outputs": [
			{
				"longdesc": "Number of repetitions of the gradient",
				"rgba": "$gradient($mirror ? 2.0*(0.5-abs(spiral_$(name_uv)-0.5)) : spiral_$(name_uv))",
				"shortdesc": "Gradient",
				"type": "rgba"
			}
		],
		"parameters": [
			{
				"control": "None",
				"default": 1.0,
				"label": "Repeat",
				"max": 20.0,
				"min": 0.0,
				"name": "amount",
				"step": 1.0,
				"type": "float"
			},
			{
				"control": "Radius1.r",
				"default": 0.3,
				"label": "Zoom",
				"max": 10.0,
				"min": 0.0,
				"name": "perspective",
				"step": 0.01,
				"type": "float"
			},
			{
				"default": false,
				"label": "Perspective",
				"name": "use_perspective",
				"type": "boolean"
			},
			{
				"default": false,
				"label": "Mirror",
				"longdesc": "Mirrors the gradient",
				"name": "mirror",
				"shortdesc": "Mirror",
				"type": "boolean"
			},
			{
				"default": {
					"interpolation": 1,
					"points": [
						{
							"a": 1.0,
							"b": 0.0,
							"g": 0.0,
							"pos": 0.0,
							"r": 0.0
						},
						{
							"a": 1.0,
							"b": 1.0,
							"g": 1.0,
							"pos": 1.0,
							"r": 1.0
						}
					],
					"type": "Gradient"
				},
				"label": "",
				"longdesc": "Gradient to be spread on the image",
				"name": "gradient",
				"shortdesc": "Gradient",
				"type": "gradient"
			}
		],
		"shortdesc": "Spiral Gradient"
	},
	"type": "shader"
}
