{
	"connections": [
		{
			"from": "gen_inputs",
			"from_port": 0,
			"to": "buffer",
			"to_port": 0
		},
		{
			"from": "buffer",
			"from_port": 0,
			"to": "edge_detect_3_3_2",
			"to_port": 0
		},
		{
			"from": "edge_detect_3_3_2",
			"from_port": 0,
			"to": "gen_outputs",
			"to_port": 0
		},
		{
			"from": "gen_inputs",
			"from_port": 1,
			"to": "edge_detect_3_3_2",
			"to_port": 1
		}
	],
	"label": "Directional Blur",
	"longdesc": "Applies a directional gaussian blur to its input",
	"name": "directional_blur",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"nodes": [
		{
			"name": "buffer",
			"node_position": {
				"x": -364.25,
				"y": -255.75
			},
			"parameters": {
				"lod": 0,
				"size": 9
			},
			"seed": 20527,
			"type": "buffer"
		},
		{
			"name": "gen_parameters",
			"node_position": {
				"x": -456.666626,
				"y": -433.666656
			},
			"parameters": {
				"param0": 9,
				"param1": 50,
				"param2": 45,
				"param3": 0
			},
			"seed": 343,
			"type": "remote",
			"widgets": [
				{
					"label": "Grid size",
					"linked_widgets": [
						{
							"node": "buffer",
							"widget": "size"
						},
						{
							"node": "edge_detect_3_3_2",
							"widget": "size"
						}
					],
					"longdesc": "The resolution of the input",
					"name": "param0",
					"shortdesc": "Size",
					"type": "linked_control"
				},
				{
					"label": "Mode",
					"linked_widgets": [
						{
							"node": "edge_detect_3_3_2",
							"widget": "mode"
						}
					],
					"longdesc": "Controls whether the blur moves in both directions or only in one.",
					"name": "param3",
					"shortdesc": "Mode",
					"type": "linked_control"
				},
				{
					"label": "Sigma",
					"linked_widgets": [
						{
							"node": "edge_detect_3_3_2",
							"widget": "sigma"
						}
					],
					"longdesc": "The strength of the blur filter",
					"name": "param1",
					"shortdesc": "Sigma",
					"type": "linked_control"
				},
				{
					"label": "Angle",
					"linked_widgets": [
						{
							"node": "edge_detect_3_3_2",
							"widget": "angle"
						}
					],
					"longdesc": "The angle of the directional blur effect",
					"name": "param2",
					"shortdesc": "Angle",
					"type": "linked_control"
				}
			]
		},
		{
			"name": "gen_inputs",
			"node_position": {
				"x": -779.666626,
				"y": -247.392853
			},
			"parameters": {

			},
			"ports": [
				{
					"group_size": 0,
					"longdesc": "The input image",
					"name": "in",
					"shortdesc": "Input",
					"type": "rgba"
				},
				{
					"group_size": 0,
					"longdesc": "A map that controls the strength of the blur filter",
					"name": "amount",
					"shortdesc": "Strength map",
					"type": "f"
				}
			],
			"seed": 91624,
			"seed_locked": true,
			"type": "ios"
		},
		{
			"name": "gen_outputs",
			"node_position": {
				"x": -45.452393,
				"y": -195.392853
			},
			"parameters": {

			},
			"ports": [
				{
					"group_size": 0,
					"longdesc": "Shows the generated blurred image",
					"name": "port0",
					"shortdesc": "Output",
					"type": "rgba"
				}
			],
			"seed": 30896,
			"type": "ios"
		},
		{
			"name": "edge_detect_3_3_2",
			"node_position": {
				"x": -357.725464,
				"y": -153.178955
			},
			"parameters": {
				"angle": 45,
				"mode": 0,
				"sigma": 50,
				"size": 9
			},
			"seed": -47470,
			"seed_locked": true,
			"shader_model": {
				"code": "",
				"global": "",
				"inputs": [
					{
						"default": "vec4(1.0)",
						"function": true,
						"label": "",
						"name": "in",
						"type": "rgba"
					},
					{
						"default": "1.0",
						"function": true,
						"label": "",
						"name": "amount",
						"type": "f"
					}
				],
				"instance": [
					"vec4 $(name)_fct(vec2 uv) {",
					"\tvec2 e = vec2(cos($angle*0.01745329251), -sin($angle*0.01745329251))/$size;",
					"\tvec4 rv = vec4(0.0);",
					"\tfloat sum = 0.0;",
					"\tfloat sigma = $sigma*$amount(uv);",
					"\tfor (float i = $mode; i <= 50.0; i += 1.0) {",
					"\t\tfloat coef = exp(-0.5*(pow(i/sigma, 2.0)))/(6.28318530718*sigma*sigma);",
					"\t\trv += $in(uv+i*e)*coef;",
					"\t\tsum += coef;",
					"\t}",
					"\treturn rv/sum;",
					"}"
				],
				"name": "Directional Blur",
				"outputs": [
					{
						"rgba": "$(name)_fct($uv)",
						"type": "rgba"
					}
				],
				"parameters": [
					{
						"default": 9,
						"first": 4,
						"label": "Size",
						"last": 12,
						"name": "size",
						"type": "size"
					},
					{
						"default": 0,
						"label": "Mode",
						"name": "mode",
						"type": "enum",
						"values": [
							{
								"name": "Both",
								"value": "-50.0"
							},
							{
								"name": "Single",
								"value": "0.0"
							}
						]
					},
					{
						"control": "None",
						"default": 0.5,
						"label": "Sigma",
						"max": 50,
						"min": 0,
						"name": "sigma",
						"step": 0.1,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0,
						"label": "Angle",
						"max": 180,
						"min": -180,
						"name": "angle",
						"step": 0.1,
						"type": "float"
					}
				]
			},
			"type": "shader"
		}
	],
	"parameters": {
		"param0": 9,
		"param1": 50,
		"param2": 45,
		"param3": 0
	},
	"seed_int": 0,
	"shortdesc": "Directional blur",
	"type": "graph"
}