{
	"name": "morphology",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"d": 0.15,
		"s": 9
	},
	"seed_int": 0,
	"shader_model": {
		"code": "",
		"global": "",
		"inputs": [
			{
				"default": "0.0",
				"function": true,
				"label": "",
				"name": "in",
				"type": "f"
			}
		],
		"instance": [
			"float $(name)_dilate(vec2 uv) {",
			"\tfloat e = 1.0/$s;",
			"\tfloat dx = min(25.0, floor($d/e))*e;",
			"\tfloat v = 0.0;",
			"\tfor (float x = -dx; x <= dx; x += e) {",
			"\t\tfloat dy = min(25.0*e, sqrt(dx*dx-x*x));",
			"\t\tfor (float y = -dy; y <= dy; y += e) {",
			"\t\t\tv = max(v, $in(uv+vec2(x, y)));",
			"\t\t}",
			"\t}",
			"\treturn v;",
			"}"
		],
		"name": "Morphology Dilation",
		"outputs": [
			{
				"f": "$(name)_dilate($uv)",
				"type": "f"
			}
		],
		"parameters": [
			{
				"default": 9,
				"first": 6,
				"label": "",
				"last": 12,
				"name": "s",
				"type": "size"
			},
			{
				"control": "None",
				"default": 0.1,
				"label": "",
				"max": 0.3,
				"min": 0,
				"name": "d",
				"step": 0.01,
				"type": "float"
			}
		]
	},
	"type": "shader"
}