{
	"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": -381.25,
				"y": -270.75
			},
			"parameters": {
				"lod": 0,
				"size": 9
			},
			"type": "buffer"
		},
		{
			"name": "gen_parameters",
			"node_position": {
				"x": -436.666626,
				"y": -413.666656
			},
			"parameters": {
				"param0": 9,
				"param1": 50,
				"param2": 45
			},
			"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": "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_value": 91624,
			"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"
				}
			],
			"type": "ios"
		},
		{
			"name": "edge_detect_3_3_2",
			"node_position": {
				"x": -376.725464,
				"y": -184.178955
			},
			"parameters": {
				"angle": 45,
				"sigma": 50,
				"size": 9
			},
			"seed_value": -47470,
			"shader_model": {
				"code": "",
				"global": "",
				"inputs": [
					{
						"default": "vec4(1.0)",
						"function": true,
						"label": "",
						"name": "in",
						"type": "rgba"
					},
					{
						"default": "1.0",
						"function": true,
						"label": "Label",
						"name": "amount",
						"type": "f"
					}
				],
				"instance": "vec4 $(name)_fct(vec2 uv) {\n\tvec2 e = vec2(cos($angle*0.01745329251), -sin($angle*0.01745329251))/$size;\n\tvec4 rv = vec4(0.0);\n\tfloat sum = 0.0;\n\tfloat sigma = $sigma*$amount(uv);\n\tfor (float i = -50.0; i <= 50.0; i += 1.0) {\n\t\tfloat coef = exp(-0.5*(pow(i/sigma, 2.0)))/(6.28318530718*sigma*sigma);\n\t\trv += $in(uv+i*e)*coef;\n\t\tsum += coef;\n\t}\n\treturn rv/sum;\n}",
				"name": "Directional Blur",
				"outputs": [
					{
						"rgba": "$(name)_fct($uv)",
						"type": "rgba"
					}
				],
				"parameters": [
					{
						"default": 9,
						"first": 4,
						"label": "Size",
						"last": 12,
						"name": "size",
						"type": "size"
					},
					{
						"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
	},
	"shortdesc": "Directional blur",
	"type": "graph"
}