{
	"name": "weave",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"columns": 4,
		"rows": 4,
		"width": 0.9
	},
	"seed_int": 0,
	"shader_model": {
		"code": "",
		"global": [
			"float oldweave(vec2 uv, vec2 count, float width) {",
			"\tuv *= count;",
			"\tfloat c = (sin(3.1415926*(uv.x+floor(uv.y)))*0.5+0.5)*step(abs(fract(uv.y)-0.5), width*0.5);",
			"\tc = max(c, (sin(3.1415926*(1.0+uv.y+floor(uv.x)))*0.5+0.5)*step(abs(fract(uv.x)-0.5), width*0.5));",
			"\treturn c;",
			"}"
		],
		"inputs": [
			{
				"default": "1.0",
				"label": "3:",
				"longdesc": "An input map that affects the width parameter",
				"name": "width_map",
				"shortdesc": "Width map",
				"type": "f"
			}
		],
		"instance": "",
		"longdesc": "Generates a simple weave pattern",
		"name": "Weave",
		"outputs": [
			{
				"f": "oldweave($uv, vec2($columns, $rows), $width*$width_map($uv))",
				"longdesc": "Shows the generated grayscale weave pattern.",
				"shortdesc": "Output",
				"type": "f"
			}
		],
		"parameters": [
			{
				"control": "None",
				"default": 4,
				"label": "Size X",
				"longdesc": "The number of columns of the pattern",
				"max": 32,
				"min": 2,
				"name": "columns",
				"shortdesc": "Size.x",
				"step": 1,
				"type": "float"
			},
			{
				"control": "None",
				"default": 4,
				"label": "Size Y",
				"longdesc": "The number of rows of the pattern",
				"max": 32,
				"min": 2,
				"name": "rows",
				"shortdesc": "Size.y",
				"step": 1,
				"type": "float"
			},
			{
				"control": "None",
				"default": 0.8,
				"label": "Width",
				"longdesc": "The width of each row/column",
				"max": 1,
				"min": 0,
				"name": "width",
				"shortdesc": "Width",
				"step": 0.05,
				"type": "float"
			}
		],
		"shortdesc": "Weave pattern"
	},
	"type": "shader"
}