{
	"connections": [
		{
			"from": "fbm2_2",
			"from_port": 0,
			"to": "brightness_contrast",
			"to_port": 0
		},
		{
			"from": "fbm2",
			"from_port": 0,
			"to": "brightness_contrast_2",
			"to_port": 0
		},
		{
			"from": "fbm2_4",
			"from_port": 0,
			"to": "brightness_contrast_3",
			"to_port": 0
		},
		{
			"from": "math_2",
			"from_port": 0,
			"to": "math_3",
			"to_port": 1
		},
		{
			"from": "perlin_2",
			"from_port": 0,
			"to": "brightness_contrast_5",
			"to_port": 0
		},
		{
			"from": "brightness_contrast_2",
			"from_port": 0,
			"to": "math",
			"to_port": 1
		},
		{
			"from": "brightness_contrast",
			"from_port": 0,
			"to": "math",
			"to_port": 0
		},
		{
			"from": "math",
			"from_port": 0,
			"to": "math_2",
			"to_port": 0
		},
		{
			"from": "brightness_contrast_3",
			"from_port": 0,
			"to": "math_4",
			"to_port": 0
		},
		{
			"from": "brightness_contrast_4",
			"from_port": 0,
			"to": "math_4",
			"to_port": 1
		},
		{
			"from": "math_4",
			"from_port": 0,
			"to": "math_2",
			"to_port": 1
		},
		{
			"from": "brightness_contrast_5",
			"from_port": 0,
			"to": "math_5",
			"to_port": 1
		},
		{
			"from": "brightness_contrast_6",
			"from_port": 0,
			"to": "math_5",
			"to_port": 0
		},
		{
			"from": "fbm2_5",
			"from_port": 0,
			"to": "brightness_contrast_6",
			"to_port": 0
		},
		{
			"from": "math_5",
			"from_port": 0,
			"to": "math_10",
			"to_port": 0
		},
		{
			"from": "math_10",
			"from_port": 0,
			"to": "math_3",
			"to_port": 0
		},
		{
			"from": "fbm2_3",
			"from_port": 0,
			"to": "brightness_contrast_4",
			"to_port": 0
		},
		{
			"from": "fbm2_6",
			"from_port": 0,
			"to": "brightness_contrast_7",
			"to_port": 0
		},
		{
			"from": "brightness_contrast_7",
			"from_port": 0,
			"to": "math_7",
			"to_port": 0
		},
		{
			"from": "math_7",
			"from_port": 0,
			"to": "math_6",
			"to_port": 0
		},
		{
			"from": "fbm2_7",
			"from_port": 0,
			"to": "brightness_contrast_8",
			"to_port": 0
		},
		{
			"from": "fbm2_8",
			"from_port": 0,
			"to": "brightness_contrast_9",
			"to_port": 0
		},
		{
			"from": "brightness_contrast_9",
			"from_port": 0,
			"to": "math_8",
			"to_port": 1
		},
		{
			"from": "brightness_contrast_8",
			"from_port": 0,
			"to": "math_8",
			"to_port": 0
		},
		{
			"from": "math_8",
			"from_port": 0,
			"to": "math_6",
			"to_port": 1
		},
		{
			"from": "perlin_3",
			"from_port": 0,
			"to": "brightness_contrast_10",
			"to_port": 0
		},
		{
			"from": "math_9",
			"from_port": 0,
			"to": "math_11",
			"to_port": 0
		},
		{
			"from": "brightness_contrast_10",
			"from_port": 0,
			"to": "math_11",
			"to_port": 1
		},
		{
			"from": "math_6",
			"from_port": 0,
			"to": "math_9",
			"to_port": 0
		},
		{
			"from": "math_11",
			"from_port": 0,
			"to": "tones",
			"to_port": 0
		},
		{
			"from": "math_3",
			"from_port": 0,
			"to": "switch",
			"to_port": 0
		},
		{
			"from": "tones",
			"from_port": 0,
			"to": "switch",
			"to_port": 1
		},
		{
			"from": "switch",
			"from_port": 0,
			"to": "buffer_2",
			"to_port": 0
		},
		{
			"from": "buffer_2",
			"from_port": 0,
			"to": "gen_outputs",
			"to_port": 0
		},
		{
			"from": "shape_2",
			"from_port": 0,
			"to": "math_12",
			"to_port": 0
		},
		{
			"from": "math_12",
			"from_port": 0,
			"to": "tiler_2",
			"to_port": 0
		},
		{
			"from": "math_12",
			"from_port": 0,
			"to": "tiler_3",
			"to_port": 0
		},
		{
			"from": "math_12",
			"from_port": 0,
			"to": "tiler_4",
			"to_port": 0
		},
		{
			"from": "math_14",
			"from_port": 0,
			"to": "math_16",
			"to_port": 0
		},
		{
			"from": "math_12",
			"from_port": 0,
			"to": "tiler_5",
			"to_port": 0
		},
		{
			"from": "tiler_5",
			"from_port": 0,
			"to": "math_17",
			"to_port": 0
		},
		{
			"from": "math_17",
			"from_port": 0,
			"to": "math_14",
			"to_port": 0
		},
		{
			"from": "math_16",
			"from_port": 0,
			"to": "brightness_contrast_11",
			"to_port": 0
		},
		{
			"from": "brightness_contrast_11",
			"from_port": 0,
			"to": "switch",
			"to_port": 2
		},
		{
			"from": "tiler_2",
			"from_port": 0,
			"to": "math_13",
			"to_port": 0
		},
		{
			"from": "math_13",
			"from_port": 0,
			"to": "math_17",
			"to_port": 1
		},
		{
			"from": "tiler_3",
			"from_port": 0,
			"to": "math_15",
			"to_port": 0
		},
		{
			"from": "math_15",
			"from_port": 0,
			"to": "math_14",
			"to_port": 1
		},
		{
			"from": "tiler_4",
			"from_port": 0,
			"to": "math_18",
			"to_port": 0
		},
		{
			"from": "math_18",
			"from_port": 0,
			"to": "math_16",
			"to_port": 1
		}
	],
	"label": "Directional Noise",
	"longdesc": "A node to generates various composite directional noises",
	"name": "directional_noise",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"nodes": [
		{
			"name": "math_4",
			"node_position": {
				"x": -1400,
				"y": 440
			},
			"parameters": {
				"clamp": true,
				"default_in1": 0,
				"default_in2": 0,
				"op": 1
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "fbm2_4",
			"node_position": {
				"x": -1980,
				"y": 340
			},
			"parameters": {
				"folds": 0,
				"iterations": 2,
				"noise": 0,
				"offset": 0,
				"persistence": 0.68,
				"scale_x": "1.0*$n_scale",
				"scale_y": "4.0*$n_scale"
			},
			"seed_int": 4124981080,
			"type": "fbm2"
		},
		{
			"name": "brightness_contrast_3",
			"node_position": {
				"x": -1680,
				"y": 340
			},
			"parameters": {
				"brightness": -0.27,
				"contrast": 0.44
			},
			"seed_int": 0,
			"type": "brightness_contrast"
		},
		{
			"name": "brightness_contrast_4",
			"node_position": {
				"x": -1680,
				"y": 580
			},
			"parameters": {
				"brightness": -0.23,
				"contrast": 0.21
			},
			"seed_int": 0,
			"type": "brightness_contrast"
		},
		{
			"name": "math_2",
			"node_position": {
				"x": -1120,
				"y": 180
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0,
				"op": 0
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "perlin_2",
			"node_position": {
				"x": -1980,
				"y": -320
			},
			"parameters": {
				"iterations": 3,
				"persistence": 0.9,
				"scale_x": "32.0*$n_scale",
				"scale_y": "256.0*$n_scale"
			},
			"seed_int": 2366492620,
			"type": "perlin"
		},
		{
			"name": "brightness_contrast_2",
			"node_position": {
				"x": -1680,
				"y": 100
			},
			"parameters": {
				"brightness": 0,
				"contrast": 1
			},
			"seed_int": 0,
			"type": "brightness_contrast"
		},
		{
			"name": "math",
			"node_position": {
				"x": -1400,
				"y": -60
			},
			"parameters": {
				"clamp": true,
				"default_in1": 0,
				"default_in2": 0,
				"op": 1
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "fbm2",
			"node_position": {
				"x": -1980,
				"y": 99
			},
			"parameters": {
				"folds": 0,
				"iterations": 2,
				"noise": 9,
				"offset": 0,
				"persistence": 0.5,
				"scale_x": "4.0*$n_scale",
				"scale_y": "72.0*$n_scale"
			},
			"seed_int": 0,
			"type": "fbm2"
		},
		{
			"name": "fbm2_2",
			"node_position": {
				"x": -1980,
				"y": -140
			},
			"parameters": {
				"folds": 0,
				"iterations": 1,
				"noise": 1,
				"offset": 0,
				"persistence": 0.5,
				"scale_x": "2.0*$n_scale",
				"scale_y": "4.0*$n_scale"
			},
			"seed_int": 0,
			"type": "fbm2"
		},
		{
			"name": "brightness_contrast",
			"node_position": {
				"x": -1680,
				"y": -140
			},
			"parameters": {
				"brightness": 0.17,
				"contrast": 0.1
			},
			"seed_int": 0,
			"type": "brightness_contrast"
		},
		{
			"name": "brightness_contrast_5",
			"node_position": {
				"x": -1680,
				"y": -320
			},
			"parameters": {
				"brightness": 0.06,
				"contrast": 0.98
			},
			"seed_int": 0,
			"type": "brightness_contrast"
		},
		{
			"name": "brightness_contrast_6",
			"node_position": {
				"x": -1700,
				"y": -560
			},
			"parameters": {
				"brightness": 0.31,
				"contrast": 0.31
			},
			"seed_int": 0,
			"type": "brightness_contrast"
		},
		{
			"name": "math_5",
			"node_position": {
				"x": -1400,
				"y": -400
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0,
				"op": 1
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "math_3",
			"node_position": {
				"x": -800,
				"y": -120
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0,
				"op": 0
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "gen_inputs",
			"node_position": {
				"x": -2286.5,
				"y": 179.852936
			},
			"parameters": {

			},
			"ports": [

			],
			"seed_int": 0,
			"type": "ios"
		},
		{
			"name": "gen_outputs",
			"node_position": {
				"x": 100,
				"y": -120
			},
			"parameters": {

			},
			"ports": [
				{
					"group_size": 0,
					"name": "port0",
					"type": "f"
				}
			],
			"seed_int": 0,
			"type": "ios"
		},
		{
			"name": "gen_parameters",
			"node_position": {
				"x": -1300,
				"y": -800
			},
			"parameters": {
				"n_scale": 1,
				"param0": 0,
				"param1": 11
			},
			"seed_int": 0,
			"type": "remote",
			"widgets": [
				{
					"configurations": {
						"Noise 1": [
							{
								"node": "switch",
								"value": 0,
								"widget": "source"
							}
						],
						"Noise 2": [
							{
								"node": "switch",
								"value": 1,
								"widget": "source"
							}
						],
						"Noise 3": [
							{
								"node": "switch",
								"value": 2,
								"widget": "source"
							}
						]
					},
					"label": "Type",
					"linked_widgets": [
						{
							"node": "switch",
							"widget": "source"
						}
					],
					"longdesc": "The type of directional noise to generate",
					"name": "param0",
					"shortdesc": "Type",
					"type": "config_control"
				},
				{
					"default": 1,
					"label": "Scale",
					"longdesc": "The scale of the noise pattern",
					"max": 8,
					"min": 1,
					"name": "n_scale",
					"shortdesc": "Scale",
					"step": 1,
					"type": "named_parameter"
				},
				{
					"label": "",
					"linked_widgets": [
						{
							"node": "buffer_2",
							"widget": "size"
						}
					],
					"longdesc": "The resolution of the output",
					"name": "param1",
					"shortdesc": "Resolution",
					"type": "linked_control"
				}
			]
		},
		{
			"name": "fbm2_5",
			"node_position": {
				"x": -1980,
				"y": -560
			},
			"parameters": {
				"folds": 0,
				"iterations": 2,
				"noise": 9,
				"offset": 0,
				"persistence": 0.87,
				"scale_x": "2.0*$n_scale",
				"scale_y": "4.0*$n_scale"
			},
			"seed_int": 1881633762,
			"type": "fbm2"
		},
		{
			"name": "math_10",
			"node_position": {
				"x": -1140,
				"y": -400
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0.75,
				"op": 2
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "fbm2_3",
			"node_position": {
				"x": -1980,
				"y": 580
			},
			"parameters": {
				"folds": 0,
				"iterations": 1,
				"noise": 0,
				"offset": 0,
				"persistence": 0.5,
				"scale_x": "1.0*$n_scale",
				"scale_y": "8.0*$n_scale"
			},
			"seed_int": 64720862,
			"type": "fbm2"
		},
		{
			"color": {
				"a": 1,
				"b": 0,
				"g": 0,
				"r": 0,
				"type": "Color"
			},
			"name": "comment",
			"node_position": {
				"x": -2000,
				"y": -600
			},
			"parameters": {

			},
			"seed_int": 0,
			"size": {
				"x": 1500,
				"y": 1420
			},
			"text": "",
			"title": "Noise 1",
			"type": "comment"
		},
		{
			"name": "math_6",
			"node_position": {
				"x": -1100,
				"y": 1220
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0,
				"op": 0
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "fbm2_6",
			"node_position": {
				"x": -1980,
				"y": 900
			},
			"parameters": {
				"folds": 0,
				"iterations": 3,
				"noise": 1,
				"offset": 0,
				"persistence": 0.6,
				"scale_x": "$n_scale",
				"scale_y": "20.0 * $n_scale"
			},
			"seed_int": 0,
			"type": "fbm2"
		},
		{
			"name": "brightness_contrast_7",
			"node_position": {
				"x": -1680,
				"y": 900
			},
			"parameters": {
				"brightness": 0.07,
				"contrast": 0.97
			},
			"seed_int": 0,
			"type": "brightness_contrast"
		},
		{
			"name": "math_7",
			"node_position": {
				"x": -1680,
				"y": 980
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0.5,
				"op": 2
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "fbm2_7",
			"node_position": {
				"x": -1980,
				"y": 1140
			},
			"parameters": {
				"folds": 0,
				"iterations": 2,
				"noise": 9,
				"offset": 0,
				"persistence": 0.5,
				"scale_x": "4.0*$n_scale",
				"scale_y": "8.0*$n_scale"
			},
			"seed_int": 0,
			"type": "fbm2"
		},
		{
			"name": "fbm2_8",
			"node_position": {
				"x": -1980,
				"y": 1380
			},
			"parameters": {
				"folds": 0,
				"iterations": 2,
				"noise": 9,
				"offset": 0,
				"persistence": 0.5,
				"scale_x": "4.0*$n_scale",
				"scale_y": "72.0*$n_scale"
			},
			"seed_int": 0,
			"type": "fbm2"
		},
		{
			"name": "brightness_contrast_8",
			"node_position": {
				"x": -1680,
				"y": 1140
			},
			"parameters": {
				"brightness": 0.24,
				"contrast": 0.26
			},
			"seed_int": 0,
			"type": "brightness_contrast"
		},
		{
			"name": "brightness_contrast_9",
			"node_position": {
				"x": -1680,
				"y": 1400
			},
			"parameters": {
				"brightness": -0.08,
				"contrast": 0.65
			},
			"seed_int": 0,
			"type": "brightness_contrast"
		},
		{
			"name": "math_8",
			"node_position": {
				"x": -1400,
				"y": 1260
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0,
				"op": 1
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "perlin_3",
			"node_position": {
				"x": -1980,
				"y": 1620
			},
			"parameters": {
				"iterations": 3,
				"persistence": 0.9,
				"scale_x": "32.0*$n_scale",
				"scale_y": "256.0*$n_scale"
			},
			"seed_int": 2901559646,
			"type": "perlin"
		},
		{
			"name": "brightness_contrast_10",
			"node_position": {
				"x": -1680,
				"y": 1620
			},
			"parameters": {
				"brightness": -0.15,
				"contrast": 0.63
			},
			"seed_int": 0,
			"type": "brightness_contrast"
		},
		{
			"name": "math_9",
			"node_position": {
				"x": -1100,
				"y": 1380
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0.5,
				"op": 2
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "math_11",
			"node_position": {
				"x": -1100,
				"y": 1540
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0,
				"op": 0
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "tones",
			"node_position": {
				"x": -800,
				"y": 1360
			},
			"parameters": {
				"in_max": {
					"a": 1,
					"b": 1,
					"g": 1,
					"r": 1,
					"type": "Color"
				},
				"in_mid": {
					"a": 0.5,
					"b": 0.64375,
					"g": 0.64375,
					"r": 0.64375,
					"type": "Color"
				},
				"in_min": {
					"a": 0,
					"b": 0.275,
					"g": 0.275,
					"r": 0.275,
					"type": "Color"
				},
				"out_max": {
					"a": 1,
					"b": 1,
					"g": 1,
					"r": 1,
					"type": "Color"
				},
				"out_min": {
					"a": 0,
					"b": 0,
					"g": 0,
					"r": 0,
					"type": "Color"
				}
			},
			"seed_int": 0,
			"type": "tones"
		},
		{
			"name": "switch",
			"node_position": {
				"x": -400,
				"y": -120
			},
			"parameters": {
				"choices": 3,
				"outputs": 1,
				"source": 0
			},
			"seed_int": 0,
			"type": "switch"
		},
		{
			"color": {
				"a": 1,
				"b": 0,
				"g": 0,
				"r": 0,
				"type": "Color"
			},
			"name": "comment_2",
			"node_position": {
				"x": -2000,
				"y": 860
			},
			"parameters": {

			},
			"seed_int": 0,
			"size": {
				"x": 1500,
				"y": 920
			},
			"text": "",
			"title": "Noise 2",
			"type": "comment"
		},
		{
			"name": "buffer_2",
			"node_position": {
				"x": -200,
				"y": -120
			},
			"parameters": {
				"size": 11
			},
			"seed_int": 0,
			"type": "buffer",
			"version": 1
		},
		{
			"name": "math_14",
			"node_position": {
				"x": -1100,
				"y": 2040
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0,
				"op": 0
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "tiler_2",
			"node_position": {
				"x": -1680,
				"y": 2000
			},
			"parameters": {
				"fixed_offset": 0,
				"inputs": 0,
				"offset": 1,
				"overlap": 2,
				"rotate": 0,
				"scale": 0,
				"scale_x": "0.2/$n_scale",
				"scale_y": "0.04/$n_scale",
				"tx": "16.0*$n_scale",
				"ty": "16.0*$n_scale",
				"value": 1,
				"variations": false
			},
			"seed_int": 1424004997,
			"shader_model": {
				"code": [
					"vec3 $(name_uv)_instance_uv = vec3(0.0);",
					"vec4 $(name_uv)_rch = tiler_$(name)($uv, vec2($tx, $ty), int($overlap), $(name_uv)_instance_uv, vec2(float($seed)));"
				],
				"global": "",
				"includes": [
					"custom_uv"
				],
				"inputs": [
					{
						"default": "0.0",
						"function": true,
						"label": "",
						"longdesc": "The input image or atlas of 4 or 16 input images",
						"name": "in",
						"shortdesc": "Input",
						"type": "f"
					},
					{
						"default": "1.0",
						"function": true,
						"label": "",
						"longdesc": "The mask applied to the pattern",
						"name": "mask",
						"shortdesc": "Mask",
						"type": "f"
					}
				],
				"instance": [
					"vec4 tiler_$(name)(vec2 uv, vec2 tile, int overlap, inout vec3 instance_uv, vec2 _seed) {",
					"\tfloat c = 0.0;",
					"\tvec3 rc = vec3(0.0);",
					"\tvec3 rc1;",
					"\tfor (int dx = -overlap; dx <= overlap; ++dx) {",
					"\t\tfor (int dy = -overlap; dy <= overlap; ++dy) {",
					"\t\t\tvec2 pos = uv*tile+vec2(float(dx), float(dy)); pos = fract((floor(mod(pos, tile))+vec2(0.5))/tile)-vec2(0.5);",
					"\t\t\tvec2 seed = rand2(pos+_seed);",
					"\t\t\trc1 = rand3(seed);",
					"\t\t\tfloat uv_rand = rand(seed.yx);",
					"\t\t\tpos = fract(pos+vec2($fixed_offset/tile.x, 0.0)*floor(mod(pos.y*tile.y, 2.0))+$offset*seed/tile);",
					"\t\t\tfloat mask = $mask(fract(pos+vec2(0.5)));",
					"\t\t\tif (mask > 0.01) {",
					"\t\t\t\tvec2 pv = fract(uv - pos)-vec2(0.5);",
					"\t\t\t\tseed = rand2(seed);",
					"\t\t\t\tfloat angle = (seed.x * 2.0 - 1.0) * $rotate * 0.01745329251;",
					"\t\t\t\tfloat ca = cos(angle);",
					"\t\t\t\tfloat sa = sin(angle);",
					"\t\t\t\tpv = vec2(ca*pv.x+sa*pv.y, -sa*pv.x+ca*pv.y);",
					"\t\t\t\tpv *= (seed.y-0.5)*2.0*$scale+1.0;",
					"\t\t\t\tpv /= vec2($scale_x, $scale_y);",
					"\t\t\t\tpv += vec2(0.5);",
					"\t\t\t\tseed = rand2(seed);",
					"\t\t\t\tvec2 clamped_pv = clamp(pv, vec2(0.0), vec2(1.0));",
					"\t\t\t\tif (pv.x != clamped_pv.x || pv.y != clamped_pv.y) {",
					"\t\t\t\t\tcontinue;",
					"\t\t\t\t}",
					"\t\t\t\tvec2 full_uv = pv;",
					"\t\t\t\tpv = get_from_tileset($inputs, uv_rand, pv);",
					"\t\t\t\tfloat c1 = $in.variation(pv, $variations ? seed.x : 0.0)*mask*  ((1.0-$value*seed.x) - 0.5) * 2.0;",
					"\t\t\t\t//c1 = (c1 - 0.5) * 2.0;",
					"\t\t\t\tc += c1;",
					"\t\t\t\trc = mix(rc, rc1, step(c, c1));",
					"\t\t\t\tinstance_uv = mix(instance_uv, vec3(full_uv, uv_rand), step(c, c1));",
					"\t\t\t}",
					"\t\t}",
					"\t}",
					"\treturn vec4(rc, c);",
					"}"
				],
				"longdesc": "Tiles several occurences of an input image while adding randomness.",
				"name": "Tiler",
				"outputs": [
					{
						"f": "$(name_uv)_rch.a",
						"longdesc": "Shows the generated pattern",
						"shortdesc": "Output",
						"type": "f"
					},
					{
						"longdesc": "Shows a random color for each instance of the input image",
						"rgb": "$(name_uv)_rch.rgb",
						"shortdesc": "Instance map",
						"type": "rgb"
					},
					{
						"longdesc": "Per instance UVs. Can be used with Custom UV node.",
						"rgb": "$(name_uv)_instance_uv",
						"shortdesc": "Instance UV",
						"type": "rgb"
					}
				],
				"parameters": [
					{
						"control": "None",
						"default": 4,
						"label": "Tile X",
						"longdesc": "The number of columns of the tiles pattern",
						"max": 64,
						"min": 1,
						"name": "tx",
						"shortdesc": "Tile.x",
						"step": 1,
						"type": "float"
					},
					{
						"control": "None",
						"default": 4,
						"label": "Tile Y",
						"longdesc": "The number of rows of the tiles pattern",
						"max": 64,
						"min": 1,
						"name": "ty",
						"shortdesc": "Tile.y",
						"step": 1,
						"type": "float"
					},
					{
						"control": "None",
						"default": 1,
						"label": "Overlap",
						"longdesc": "The number of neighbour tiles an instance of the input image can overlap. Set this parameter to the lowest value that generates the expected result (where all instances are fully visible) to improve performance.",
						"max": 5,
						"min": 0,
						"name": "overlap",
						"shortdesc": "Overlap",
						"step": 1,
						"type": "float"
					},
					{
						"default": 0,
						"label": "Inputs",
						"longdesc": "The input type of the node:\n- 1: single image\n- 4: atlas of 4 images\n- 16: atlas of 16 images\nAtlases can be created using the Tile2x2 node.",
						"name": "inputs",
						"shortdesc": "Input",
						"type": "enum",
						"values": [
							{
								"name": "1",
								"value": " 1.0"
							},
							{
								"name": "4",
								"value": "2.0"
							},
							{
								"name": "16",
								"value": "4.0"
							}
						]
					},
					{
						"control": "None",
						"default": 1,
						"label": "Scale X",
						"longdesc": "The scale of input images on the X axis",
						"max": 2,
						"min": 0,
						"name": "scale_x",
						"shortdesc": "Scale.x",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 1,
						"label": "Scale Y",
						"longdesc": "The scale of input images on the Y axis",
						"max": 2,
						"min": 0,
						"name": "scale_y",
						"shortdesc": "Scale.y",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0.5,
						"label": "Fixed Offset",
						"longdesc": "The relative offset of odd rows",
						"max": 1,
						"min": 0,
						"name": "fixed_offset",
						"shortdesc": "FixedOffset",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0.5,
						"label": "Rnd Offset",
						"max": 1,
						"min": 0,
						"name": "offset",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0,
						"label": "Rnd Rotate",
						"longdesc": "The random rotation applied to each image instance",
						"max": 180,
						"min": 0,
						"name": "rotate",
						"shortdesc": "RndRotate",
						"step": 0.1,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0,
						"label": "Rnd Scale",
						"longdesc": "The random scale applied to each image instance",
						"max": 1,
						"min": 0,
						"name": "scale",
						"shortdesc": "RndScale",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0.5,
						"label": "Rnd Value",
						"longdesc": "The random grayscale value applied to each image instance",
						"max": 1,
						"min": 0,
						"name": "value",
						"shortdesc": "RndValue",
						"step": 0.01,
						"type": "float"
					},
					{
						"default": false,
						"label": "Variations",
						"longdesc": "Check to tile variations of the input",
						"name": "variations",
						"shortdesc": "Variations",
						"type": "boolean"
					}
				],
				"shortdesc": "Tiler"
			},
			"type": "shader"
		},
		{
			"name": "shape_2",
			"node_position": {
				"x": -1980,
				"y": 1840
			},
			"parameters": {
				"edge": 1,
				"radius": 1,
				"shape": 0,
				"sides": 5
			},
			"seed_int": 0,
			"type": "shape"
		},
		{
			"name": "math_12",
			"node_position": {
				"x": -1800,
				"y": 1840
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0,
				"op": 20
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "tiler_3",
			"node_position": {
				"x": -1980,
				"y": 2380
			},
			"parameters": {
				"fixed_offset": 0,
				"inputs": 0,
				"offset": 1,
				"overlap": 2,
				"rotate": 0,
				"scale": 0,
				"scale_x": "0.14/$n_scale",
				"scale_y": "0.02/$n_scale",
				"tx": "26.0*$n_scale",
				"ty": "26.0*$n_scale",
				"value": 1,
				"variations": false
			},
			"seed_int": 0,
			"shader_model": {
				"code": [
					"vec3 $(name_uv)_instance_uv = vec3(0.0);",
					"vec4 $(name_uv)_rch = tiler_$(name)($uv, vec2($tx, $ty), int($overlap), $(name_uv)_instance_uv, vec2(float($seed)));"
				],
				"global": "",
				"includes": [
					"custom_uv"
				],
				"inputs": [
					{
						"default": "0.0",
						"function": true,
						"label": "",
						"longdesc": "The input image or atlas of 4 or 16 input images",
						"name": "in",
						"shortdesc": "Input",
						"type": "f"
					},
					{
						"default": "1.0",
						"function": true,
						"label": "",
						"longdesc": "The mask applied to the pattern",
						"name": "mask",
						"shortdesc": "Mask",
						"type": "f"
					}
				],
				"instance": [
					"vec4 tiler_$(name)(vec2 uv, vec2 tile, int overlap, inout vec3 instance_uv, vec2 _seed) {",
					"\tfloat c = 0.0;",
					"\tvec3 rc = vec3(0.0);",
					"\tvec3 rc1;",
					"\tfor (int dx = -overlap; dx <= overlap; ++dx) {",
					"\t\tfor (int dy = -overlap; dy <= overlap; ++dy) {",
					"\t\t\tvec2 pos = uv*tile+vec2(float(dx), float(dy)); pos = fract((floor(mod(pos, tile))+vec2(0.5))/tile)-vec2(0.5);",
					"\t\t\tvec2 seed = rand2(pos+_seed);",
					"\t\t\trc1 = rand3(seed);",
					"\t\t\tfloat uv_rand = rand(seed.yx);",
					"\t\t\tpos = fract(pos+vec2($fixed_offset/tile.x, 0.0)*floor(mod(pos.y*tile.y, 2.0))+$offset*seed/tile);",
					"\t\t\tfloat mask = $mask(fract(pos+vec2(0.5)));",
					"\t\t\tif (mask > 0.01) {",
					"\t\t\t\tvec2 pv = fract(uv - pos)-vec2(0.5);",
					"\t\t\t\tseed = rand2(seed);",
					"\t\t\t\tfloat angle = (seed.x * 2.0 - 1.0) * $rotate * 0.01745329251;",
					"\t\t\t\tfloat ca = cos(angle);",
					"\t\t\t\tfloat sa = sin(angle);",
					"\t\t\t\tpv = vec2(ca*pv.x+sa*pv.y, -sa*pv.x+ca*pv.y);",
					"\t\t\t\tpv *= (seed.y-0.5)*2.0*$scale+1.0;",
					"\t\t\t\tpv /= vec2($scale_x, $scale_y);",
					"\t\t\t\tpv += vec2(0.5);",
					"\t\t\t\tseed = rand2(seed);",
					"\t\t\t\tvec2 clamped_pv = clamp(pv, vec2(0.0), vec2(1.0));",
					"\t\t\t\tif (pv.x != clamped_pv.x || pv.y != clamped_pv.y) {",
					"\t\t\t\t\tcontinue;",
					"\t\t\t\t}",
					"\t\t\t\tvec2 full_uv = pv;",
					"\t\t\t\tpv = get_from_tileset($inputs, uv_rand, pv);",
					"\t\t\t\tfloat c1 = $in.variation(pv, $variations ? seed.x : 0.0)*mask*  ((1.0-$value*seed.x) - 0.5) * 2.0;",
					"\t\t\t\t//c1 = (c1 - 0.5) * 2.0;",
					"\t\t\t\tc += c1;",
					"\t\t\t\trc = mix(rc, rc1, step(c, c1));",
					"\t\t\t\tinstance_uv = mix(instance_uv, vec3(full_uv, uv_rand), step(c, c1));",
					"\t\t\t}",
					"\t\t}",
					"\t}",
					"\treturn vec4(rc, c);",
					"}"
				],
				"longdesc": "Tiles several occurences of an input image while adding randomness.",
				"name": "Tiler",
				"outputs": [
					{
						"f": "$(name_uv)_rch.a",
						"longdesc": "Shows the generated pattern",
						"shortdesc": "Output",
						"type": "f"
					},
					{
						"longdesc": "Shows a random color for each instance of the input image",
						"rgb": "$(name_uv)_rch.rgb",
						"shortdesc": "Instance map",
						"type": "rgb"
					},
					{
						"longdesc": "Per instance UVs. Can be used with Custom UV node.",
						"rgb": "$(name_uv)_instance_uv",
						"shortdesc": "Instance UV",
						"type": "rgb"
					}
				],
				"parameters": [
					{
						"control": "None",
						"default": 4,
						"label": "Tile X",
						"longdesc": "The number of columns of the tiles pattern",
						"max": 64,
						"min": 1,
						"name": "tx",
						"shortdesc": "Tile.x",
						"step": 1,
						"type": "float"
					},
					{
						"control": "None",
						"default": 4,
						"label": "Tile Y",
						"longdesc": "The number of rows of the tiles pattern",
						"max": 64,
						"min": 1,
						"name": "ty",
						"shortdesc": "Tile.y",
						"step": 1,
						"type": "float"
					},
					{
						"control": "None",
						"default": 1,
						"label": "Overlap",
						"longdesc": "The number of neighbour tiles an instance of the input image can overlap. Set this parameter to the lowest value that generates the expected result (where all instances are fully visible) to improve performance.",
						"max": 5,
						"min": 0,
						"name": "overlap",
						"shortdesc": "Overlap",
						"step": 1,
						"type": "float"
					},
					{
						"default": 0,
						"label": "Inputs",
						"longdesc": "The input type of the node:\n- 1: single image\n- 4: atlas of 4 images\n- 16: atlas of 16 images\nAtlases can be created using the Tile2x2 node.",
						"name": "inputs",
						"shortdesc": "Input",
						"type": "enum",
						"values": [
							{
								"name": "1",
								"value": " 1.0"
							},
							{
								"name": "4",
								"value": "2.0"
							},
							{
								"name": "16",
								"value": "4.0"
							}
						]
					},
					{
						"control": "None",
						"default": 1,
						"label": "Scale X",
						"longdesc": "The scale of input images on the X axis",
						"max": 2,
						"min": 0,
						"name": "scale_x",
						"shortdesc": "Scale.x",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 1,
						"label": "Scale Y",
						"longdesc": "The scale of input images on the Y axis",
						"max": 2,
						"min": 0,
						"name": "scale_y",
						"shortdesc": "Scale.y",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0.5,
						"label": "Fixed Offset",
						"longdesc": "The relative offset of odd rows",
						"max": 1,
						"min": 0,
						"name": "fixed_offset",
						"shortdesc": "FixedOffset",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0.5,
						"label": "Rnd Offset",
						"max": 1,
						"min": 0,
						"name": "offset",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0,
						"label": "Rnd Rotate",
						"longdesc": "The random rotation applied to each image instance",
						"max": 180,
						"min": 0,
						"name": "rotate",
						"shortdesc": "RndRotate",
						"step": 0.1,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0,
						"label": "Rnd Scale",
						"longdesc": "The random scale applied to each image instance",
						"max": 1,
						"min": 0,
						"name": "scale",
						"shortdesc": "RndScale",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0.5,
						"label": "Rnd Value",
						"longdesc": "The random grayscale value applied to each image instance",
						"max": 1,
						"min": 0,
						"name": "value",
						"shortdesc": "RndValue",
						"step": 0.01,
						"type": "float"
					},
					{
						"default": false,
						"label": "Variations",
						"longdesc": "Check to tile variations of the input",
						"name": "variations",
						"shortdesc": "Variations",
						"type": "boolean"
					}
				],
				"shortdesc": "Tiler"
			},
			"type": "shader"
		},
		{
			"name": "tiler_4",
			"node_position": {
				"x": -1680,
				"y": 2380
			},
			"parameters": {
				"fixed_offset": 0,
				"inputs": 0,
				"offset": 1,
				"overlap": 3,
				"rotate": 0,
				"scale": 0,
				"scale_x": "0.08/$n_scale",
				"scale_y": "0.01/$n_scale",
				"tx": "64.0*$n_scale",
				"ty": "64.0*$n_scale",
				"value": 1,
				"variations": false
			},
			"seed_int": 0,
			"shader_model": {
				"code": [
					"vec3 $(name_uv)_instance_uv = vec3(0.0);",
					"vec4 $(name_uv)_rch = tiler_$(name)($uv, vec2($tx, $ty), int($overlap), $(name_uv)_instance_uv, vec2(float($seed)));"
				],
				"global": "",
				"includes": [
					"custom_uv"
				],
				"inputs": [
					{
						"default": "0.0",
						"function": true,
						"label": "",
						"longdesc": "The input image or atlas of 4 or 16 input images",
						"name": "in",
						"shortdesc": "Input",
						"type": "f"
					},
					{
						"default": "1.0",
						"function": true,
						"label": "",
						"longdesc": "The mask applied to the pattern",
						"name": "mask",
						"shortdesc": "Mask",
						"type": "f"
					}
				],
				"instance": [
					"vec4 tiler_$(name)(vec2 uv, vec2 tile, int overlap, inout vec3 instance_uv, vec2 _seed) {",
					"\tfloat c = 0.0;",
					"\tvec3 rc = vec3(0.0);",
					"\tvec3 rc1;",
					"\tfor (int dx = -overlap; dx <= overlap; ++dx) {",
					"\t\tfor (int dy = -overlap; dy <= overlap; ++dy) {",
					"\t\t\tvec2 pos = uv*tile+vec2(float(dx), float(dy)); pos = fract((floor(mod(pos, tile))+vec2(0.5))/tile)-vec2(0.5);",
					"\t\t\tvec2 seed = rand2(pos+_seed);",
					"\t\t\trc1 = rand3(seed);",
					"\t\t\tfloat uv_rand = rand(seed.yx);",
					"\t\t\tpos = fract(pos+vec2($fixed_offset/tile.x, 0.0)*floor(mod(pos.y*tile.y, 2.0))+$offset*seed/tile);",
					"\t\t\tfloat mask = $mask(fract(pos+vec2(0.5)));",
					"\t\t\tif (mask > 0.01) {",
					"\t\t\t\tvec2 pv = fract(uv - pos)-vec2(0.5);",
					"\t\t\t\tseed = rand2(seed);",
					"\t\t\t\tfloat angle = (seed.x * 2.0 - 1.0) * $rotate * 0.01745329251;",
					"\t\t\t\tfloat ca = cos(angle);",
					"\t\t\t\tfloat sa = sin(angle);",
					"\t\t\t\tpv = vec2(ca*pv.x+sa*pv.y, -sa*pv.x+ca*pv.y);",
					"\t\t\t\tpv *= (seed.y-0.5)*2.0*$scale+1.0;",
					"\t\t\t\tpv /= vec2($scale_x, $scale_y);",
					"\t\t\t\tpv += vec2(0.5);",
					"\t\t\t\tseed = rand2(seed);",
					"\t\t\t\tvec2 clamped_pv = clamp(pv, vec2(0.0), vec2(1.0));",
					"\t\t\t\tif (pv.x != clamped_pv.x || pv.y != clamped_pv.y) {",
					"\t\t\t\t\tcontinue;",
					"\t\t\t\t}",
					"\t\t\t\tvec2 full_uv = pv;",
					"\t\t\t\tpv = get_from_tileset($inputs, uv_rand, pv);",
					"\t\t\t\tfloat c1 = $in.variation(pv, $variations ? seed.x : 0.0)*mask*  ((1.0-$value*seed.x) - 0.5) * 2.0;",
					"\t\t\t\t//c1 = (c1 - 0.5) * 2.0;",
					"\t\t\t\tc += c1;",
					"\t\t\t\trc = mix(rc, rc1, step(c, c1));",
					"\t\t\t\tinstance_uv = mix(instance_uv, vec3(full_uv, uv_rand), step(c, c1));",
					"\t\t\t}",
					"\t\t}",
					"\t}",
					"\treturn vec4(rc, c);",
					"}"
				],
				"longdesc": "Tiles several occurences of an input image while adding randomness.",
				"name": "Tiler",
				"outputs": [
					{
						"f": "$(name_uv)_rch.a",
						"longdesc": "Shows the generated pattern",
						"shortdesc": "Output",
						"type": "f"
					},
					{
						"longdesc": "Shows a random color for each instance of the input image",
						"rgb": "$(name_uv)_rch.rgb",
						"shortdesc": "Instance map",
						"type": "rgb"
					},
					{
						"longdesc": "Per instance UVs. Can be used with Custom UV node.",
						"rgb": "$(name_uv)_instance_uv",
						"shortdesc": "Instance UV",
						"type": "rgb"
					}
				],
				"parameters": [
					{
						"control": "None",
						"default": 4,
						"label": "Tile X",
						"longdesc": "The number of columns of the tiles pattern",
						"max": 64,
						"min": 1,
						"name": "tx",
						"shortdesc": "Tile.x",
						"step": 1,
						"type": "float"
					},
					{
						"control": "None",
						"default": 4,
						"label": "Tile Y",
						"longdesc": "The number of rows of the tiles pattern",
						"max": 64,
						"min": 1,
						"name": "ty",
						"shortdesc": "Tile.y",
						"step": 1,
						"type": "float"
					},
					{
						"control": "None",
						"default": 1,
						"label": "Overlap",
						"longdesc": "The number of neighbour tiles an instance of the input image can overlap. Set this parameter to the lowest value that generates the expected result (where all instances are fully visible) to improve performance.",
						"max": 5,
						"min": 0,
						"name": "overlap",
						"shortdesc": "Overlap",
						"step": 1,
						"type": "float"
					},
					{
						"default": 0,
						"label": "Inputs",
						"longdesc": "The input type of the node:\n- 1: single image\n- 4: atlas of 4 images\n- 16: atlas of 16 images\nAtlases can be created using the Tile2x2 node.",
						"name": "inputs",
						"shortdesc": "Input",
						"type": "enum",
						"values": [
							{
								"name": "1",
								"value": " 1.0"
							},
							{
								"name": "4",
								"value": "2.0"
							},
							{
								"name": "16",
								"value": "4.0"
							}
						]
					},
					{
						"control": "None",
						"default": 1,
						"label": "Scale X",
						"longdesc": "The scale of input images on the X axis",
						"max": 2,
						"min": 0,
						"name": "scale_x",
						"shortdesc": "Scale.x",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 1,
						"label": "Scale Y",
						"longdesc": "The scale of input images on the Y axis",
						"max": 2,
						"min": 0,
						"name": "scale_y",
						"shortdesc": "Scale.y",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0.5,
						"label": "Fixed Offset",
						"longdesc": "The relative offset of odd rows",
						"max": 1,
						"min": 0,
						"name": "fixed_offset",
						"shortdesc": "FixedOffset",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0.5,
						"label": "Rnd Offset",
						"max": 1,
						"min": 0,
						"name": "offset",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0,
						"label": "Rnd Rotate",
						"longdesc": "The random rotation applied to each image instance",
						"max": 180,
						"min": 0,
						"name": "rotate",
						"shortdesc": "RndRotate",
						"step": 0.1,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0,
						"label": "Rnd Scale",
						"longdesc": "The random scale applied to each image instance",
						"max": 1,
						"min": 0,
						"name": "scale",
						"shortdesc": "RndScale",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0.5,
						"label": "Rnd Value",
						"longdesc": "The random grayscale value applied to each image instance",
						"max": 1,
						"min": 0,
						"name": "value",
						"shortdesc": "RndValue",
						"step": 0.01,
						"type": "float"
					},
					{
						"default": false,
						"label": "Variations",
						"longdesc": "Check to tile variations of the input",
						"name": "variations",
						"shortdesc": "Variations",
						"type": "boolean"
					}
				],
				"shortdesc": "Tiler"
			},
			"type": "shader"
		},
		{
			"name": "math_16",
			"node_position": {
				"x": -1100,
				"y": 2240
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0,
				"op": 0
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "tiler_5",
			"node_position": {
				"x": -1980,
				"y": 2000
			},
			"parameters": {
				"fixed_offset": 0,
				"inputs": 0,
				"offset": 1,
				"overlap": 2,
				"rotate": 0,
				"scale": 0.27,
				"scale_x": "0.34/$n_scale",
				"scale_y": "0.07/$n_scale",
				"tx": "8.0*$n_scale",
				"ty": "8.0*$n_scale",
				"value": 1,
				"variations": false
			},
			"seed_int": 0,
			"shader_model": {
				"code": [
					"vec3 $(name_uv)_instance_uv = vec3(0.0);",
					"vec4 $(name_uv)_rch = tiler_$(name)($uv, vec2($tx, $ty), int($overlap), $(name_uv)_instance_uv, vec2(float($seed)));"
				],
				"global": "",
				"includes": [
					"custom_uv"
				],
				"inputs": [
					{
						"default": "0.0",
						"function": true,
						"label": "",
						"longdesc": "The input image or atlas of 4 or 16 input images",
						"name": "in",
						"shortdesc": "Input",
						"type": "f"
					},
					{
						"default": "1.0",
						"function": true,
						"label": "",
						"longdesc": "The mask applied to the pattern",
						"name": "mask",
						"shortdesc": "Mask",
						"type": "f"
					}
				],
				"instance": [
					"vec4 tiler_$(name)(vec2 uv, vec2 tile, int overlap, inout vec3 instance_uv, vec2 _seed) {",
					"\tfloat c = 0.0;",
					"\tvec3 rc = vec3(0.0);",
					"\tvec3 rc1;",
					"\tfor (int dx = -overlap; dx <= overlap; ++dx) {",
					"\t\tfor (int dy = -overlap; dy <= overlap; ++dy) {",
					"\t\t\tvec2 pos = uv*tile+vec2(float(dx), float(dy)); pos = fract((floor(mod(pos, tile))+vec2(0.5))/tile)-vec2(0.5);",
					"\t\t\tvec2 seed = rand2(pos+_seed);",
					"\t\t\trc1 = rand3(seed);",
					"\t\t\tfloat uv_rand = rand(seed.yx);",
					"\t\t\tpos = fract(pos+vec2($fixed_offset/tile.x, 0.0)*floor(mod(pos.y*tile.y, 2.0))+$offset*seed/tile);",
					"\t\t\tfloat mask = $mask(fract(pos+vec2(0.5)));",
					"\t\t\tif (mask > 0.01) {",
					"\t\t\t\tvec2 pv = fract(uv - pos)-vec2(0.5);",
					"\t\t\t\tseed = rand2(seed);",
					"\t\t\t\tfloat angle = (seed.x * 2.0 - 1.0) * $rotate * 0.01745329251;",
					"\t\t\t\tfloat ca = cos(angle);",
					"\t\t\t\tfloat sa = sin(angle);",
					"\t\t\t\tpv = vec2(ca*pv.x+sa*pv.y, -sa*pv.x+ca*pv.y);",
					"\t\t\t\tpv *= (seed.y-0.5)*2.0*$scale+1.0;",
					"\t\t\t\tpv /= vec2($scale_x, $scale_y);",
					"\t\t\t\tpv += vec2(0.5);",
					"\t\t\t\tseed = rand2(seed);",
					"\t\t\t\tvec2 clamped_pv = clamp(pv, vec2(0.0), vec2(1.0));",
					"\t\t\t\tif (pv.x != clamped_pv.x || pv.y != clamped_pv.y) {",
					"\t\t\t\t\tcontinue;",
					"\t\t\t\t}",
					"\t\t\t\tvec2 full_uv = pv;",
					"\t\t\t\tpv = get_from_tileset($inputs, uv_rand, pv);",
					"\t\t\t\tfloat c1 = $in.variation(pv, $variations ? seed.x : 0.0)*mask*  ((1.0-$value*seed.x) - 0.5) * 2.0;",
					"\t\t\t\t//c1 = (c1 - 0.5) * 2.0;",
					"\t\t\t\tc += c1;",
					"\t\t\t\trc = mix(rc, rc1, step(c, c1));",
					"\t\t\t\tinstance_uv = mix(instance_uv, vec3(full_uv, uv_rand), step(c, c1));",
					"\t\t\t}",
					"\t\t}",
					"\t}",
					"\treturn vec4(rc, c);",
					"}"
				],
				"longdesc": "Tiles several occurences of an input image while adding randomness.",
				"name": "Tiler",
				"outputs": [
					{
						"f": "$(name_uv)_rch.a",
						"longdesc": "Shows the generated pattern",
						"shortdesc": "Output",
						"type": "f"
					},
					{
						"longdesc": "Shows a random color for each instance of the input image",
						"rgb": "$(name_uv)_rch.rgb",
						"shortdesc": "Instance map",
						"type": "rgb"
					},
					{
						"longdesc": "Per instance UVs. Can be used with Custom UV node.",
						"rgb": "$(name_uv)_instance_uv",
						"shortdesc": "Instance UV",
						"type": "rgb"
					}
				],
				"parameters": [
					{
						"control": "None",
						"default": 4,
						"label": "Tile X",
						"longdesc": "The number of columns of the tiles pattern",
						"max": 64,
						"min": 1,
						"name": "tx",
						"shortdesc": "Tile.x",
						"step": 1,
						"type": "float"
					},
					{
						"control": "None",
						"default": 4,
						"label": "Tile Y",
						"longdesc": "The number of rows of the tiles pattern",
						"max": 64,
						"min": 1,
						"name": "ty",
						"shortdesc": "Tile.y",
						"step": 1,
						"type": "float"
					},
					{
						"control": "None",
						"default": 1,
						"label": "Overlap",
						"longdesc": "The number of neighbour tiles an instance of the input image can overlap. Set this parameter to the lowest value that generates the expected result (where all instances are fully visible) to improve performance.",
						"max": 5,
						"min": 0,
						"name": "overlap",
						"shortdesc": "Overlap",
						"step": 1,
						"type": "float"
					},
					{
						"default": 0,
						"label": "Inputs",
						"longdesc": "The input type of the node:\n- 1: single image\n- 4: atlas of 4 images\n- 16: atlas of 16 images\nAtlases can be created using the Tile2x2 node.",
						"name": "inputs",
						"shortdesc": "Input",
						"type": "enum",
						"values": [
							{
								"name": "1",
								"value": " 1.0"
							},
							{
								"name": "4",
								"value": "2.0"
							},
							{
								"name": "16",
								"value": "4.0"
							}
						]
					},
					{
						"control": "None",
						"default": 1,
						"label": "Scale X",
						"longdesc": "The scale of input images on the X axis",
						"max": 2,
						"min": 0,
						"name": "scale_x",
						"shortdesc": "Scale.x",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 1,
						"label": "Scale Y",
						"longdesc": "The scale of input images on the Y axis",
						"max": 2,
						"min": 0,
						"name": "scale_y",
						"shortdesc": "Scale.y",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0.5,
						"label": "Fixed Offset",
						"longdesc": "The relative offset of odd rows",
						"max": 1,
						"min": 0,
						"name": "fixed_offset",
						"shortdesc": "FixedOffset",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0.5,
						"label": "Rnd Offset",
						"max": 1,
						"min": 0,
						"name": "offset",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0,
						"label": "Rnd Rotate",
						"longdesc": "The random rotation applied to each image instance",
						"max": 180,
						"min": 0,
						"name": "rotate",
						"shortdesc": "RndRotate",
						"step": 0.1,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0,
						"label": "Rnd Scale",
						"longdesc": "The random scale applied to each image instance",
						"max": 1,
						"min": 0,
						"name": "scale",
						"shortdesc": "RndScale",
						"step": 0.01,
						"type": "float"
					},
					{
						"control": "None",
						"default": 0.5,
						"label": "Rnd Value",
						"longdesc": "The random grayscale value applied to each image instance",
						"max": 1,
						"min": 0,
						"name": "value",
						"shortdesc": "RndValue",
						"step": 0.01,
						"type": "float"
					},
					{
						"default": false,
						"label": "Variations",
						"longdesc": "Check to tile variations of the input",
						"name": "variations",
						"shortdesc": "Variations",
						"type": "boolean"
					}
				],
				"shortdesc": "Tiler"
			},
			"type": "shader"
		},
		{
			"name": "math_17",
			"node_position": {
				"x": -1100,
				"y": 1840
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0,
				"op": 0
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "brightness_contrast_11",
			"node_position": {
				"x": -800,
				"y": 1840
			},
			"parameters": {
				"brightness": 0.21,
				"contrast": 0.25
			},
			"seed_int": 0,
			"type": "brightness_contrast"
		},
		{
			"color": {
				"a": 1,
				"b": 0,
				"g": 0,
				"r": 0,
				"type": "Color"
			},
			"name": "comment_3",
			"node_position": {
				"x": -2000,
				"y": 1800
			},
			"parameters": {

			},
			"seed_int": 0,
			"size": {
				"x": 1500,
				"y": 960
			},
			"text": "",
			"title": "Noise 3",
			"type": "comment"
		},
		{
			"name": "math_13",
			"node_position": {
				"x": -1400,
				"y": 2000
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0.5,
				"op": 2
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "math_15",
			"node_position": {
				"x": -1400,
				"y": 2160
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0.25,
				"op": 2
			},
			"seed_int": 0,
			"type": "math"
		},
		{
			"name": "math_18",
			"node_position": {
				"x": -1400,
				"y": 2320
			},
			"parameters": {
				"clamp": false,
				"default_in1": 0,
				"default_in2": 0.125,
				"op": 2
			},
			"seed_int": 0,
			"type": "math"
		}
	],
	"parameters": {
		"n_scale": 1,
		"param0": 0,
		"param1": 11
	},
	"seed_int": 324592153,
	"shortdesc": "Directional Noise",
	"type": "graph"
}