{
	"connections": [
		{
			"from": "tones_step_3",
			"from_port": 0,
			"to": "gen_outputs",
			"to_port": 0
		},
		{
			"from": "fast_blur",
			"from_port": 0,
			"to": "tones_step_3",
			"to_port": 0
		},
		{
			"from": "gen_inputs",
			"from_port": 0,
			"to": "1843",
			"to_port": 0
		},
		{
			"from": "1843",
			"from_port": 0,
			"to": "fast_blur",
			"to_port": 0
		}
	],
	"label": "Binary Smooth",
	"longdesc": "Smoothes the outline of a mask",
	"name": "binary_smooth",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"nodes": [
		{
			"name": "tones_step_3",
			"node_position": {
				"x": -411,
				"y": -389
			},
			"parameters": {
				"invert": false,
				"value": 0.5,
				"width": 0
			},
			"seed": 1071,
			"shader_model": {
				"code": [
					"vec3 $(name_uv)_false = clamp(($in($uv).rgb-vec3( clamp($value, 0.0001, 0.9999)))/max(0.0001, $width)+vec3(0.5), vec3(0.0), vec3(1.0));",
					"vec3 $(name_uv)_true = vec3(1.0)-$(name_uv)_false;"
				],
				"global": "",
				"inputs": [
					{
						"default": "vec4(0.5 ,0.5, 0.5, 1.0)",
						"label": "",
						"longdesc": "The input image",
						"name": "in",
						"shortdesc": "Input",
						"type": "rgba"
					}
				],
				"instance": "",
				"longdesc": "Emphasizes dark and light tones around a specified value",
				"name": "Tones step",
				"outputs": [
					{
						"longdesc": "Shows the generated high contrast image",
						"rgba": "vec4($(name_uv)_$invert, $in($uv).a)",
						"shortdesc": "Output",
						"type": "rgba"
					}
				],
				"parameters": [
					{
						"control": "None",
						"default": 0.5,
						"label": "Value",
						"longdesc": "The value of the input that separate dark and light zones of the result",
						"max": 1,
						"min": 0,
						"name": "value",
						"shortdesc": "Value",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 1,
						"label": "Width",
						"longdesc": "The width (in tones space) of the transition area",
						"max": 1,
						"min": 0,
						"name": "width",
						"shortdesc": "width",
						"step": 0.01,
						"type": "float"
					},
					{
						"default": false,
						"label": "Invert",
						"longdesc": "Invert the generated image if set",
						"name": "invert",
						"shortdesc": "Invert",
						"type": "boolean"
					}
				],
				"shortdesc": "Tones step"
			},
			"type": "shader"
		},
		{
			"name": "gen_inputs",
			"node_position": {
				"x": -1400,
				"y": -400
			},
			"parameters": {

			},
			"ports": [
				{
					"group_size": 0,
					"name": "Height",
					"type": "f"
				}
			],
			"seed": 31266,
			"type": "ios"
		},
		{
			"name": "gen_outputs",
			"node_position": {
				"x": -120,
				"y": -400
			},
			"parameters": {

			},
			"ports": [
				{
					"group_size": 0,
					"longdesc": "Shows the generate smoothed mask",
					"name": "out",
					"shortdesc": "Output",
					"type": "f"
				}
			],
			"seed": 35961,
			"type": "ios"
		},
		{
			"name": "gen_parameters",
			"node_position": {
				"x": -800,
				"y": -600
			},
			"parameters": {
				"bevel": 0,
				"offset": 0.5,
				"size": 10,
				"smooth": 60
			},
			"seed": 18638,
			"type": "remote",
			"widgets": [
				{
					"label": "",
					"linked_widgets": [
						{
							"node": "fast_blur",
							"widget": "param0"
						}
					],
					"longdesc": "The resolution used for the blur effect, note the output is not limited to this resolution.",
					"name": "size",
					"shortdesc": "Resolution",
					"type": "linked_control"
				},
				{
					"label": "Smooth",
					"linked_widgets": [
						{
							"node": "fast_blur",
							"widget": "param1"
						}
					],
					"longdesc": "The amount of smoothing to the mask shape",
					"name": "smooth",
					"shortdesc": "Smooth",
					"type": "linked_control"
				},
				{
					"label": "Offset",
					"linked_widgets": [
						{
							"node": "tones_step_3",
							"widget": "value"
						}
					],
					"longdesc": "Offset to expand or contract the smoothed shape",
					"name": "offset",
					"shortdesc": "Offset",
					"type": "linked_control"
				},
				{
					"label": "Bevel",
					"linked_widgets": [
						{
							"node": "tones_step_3",
							"widget": "width"
						}
					],
					"longdesc": "Controls the width of edge of the output. Note this bevel will not be linear.",
					"name": "bevel",
					"shortdesc": "Bevel",
					"type": "linked_control"
				}
			]
		},
		{
			"name": "fast_blur",
			"node_position": {
				"x": -721,
				"y": -401
			},
			"parameters": {
				"param0": 10,
				"param1": 60,
				"param2": 2
			},
			"seed_int": 0,
			"type": "fast_blur"
		},
		{
			"name": "1843",
			"node_position": {
				"x": -920,
				"y": -400
			},
			"parameters": {

			},
			"seed_int": 0,
			"shader_model": {
				"code": "",
				"global": "",
				"inputs": [
					{
						"default": "0.0",
						"label": "",
						"name": "in",
						"type": "f"
					}
				],
				"instance": "",
				"name": "Mask",
				"outputs": [
					{
						"f": "float($in($uv) > 0.5)",
						"type": "f"
					}
				],
				"parameters": [

				]
			},
			"type": "shader"
		}
	],
	"parameters": {
		"bevel": 0,
		"offset": 0.5,
		"size": 10,
		"smooth": 60
	},
	"seed_int": 0,
	"shortdesc": "Binary Smooth",
	"type": "graph"
}