{
	"name": "truchet_generic",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"size": 6
	},
	"seed_int": 0,
	"shader_model": {
		"code": "",
		"global": [
			"vec2 truchet_generic_uv(vec2 uv, vec2 seed) {",
			"\tvec2 i = floor(uv);",
			"\tvec2 f = fract(uv);",
			"\tvec2 invert = step(rand2(seed+i), vec2(0.5));",
			"\treturn f*(vec2(1.0)-invert)+(vec2(1.0)-f)*invert;",
			"}",
			""
		],
		"inputs": [
			{
				"default": "vec4(1.0)",
				"label": "",
				"name": "in",
				"type": "rgba"
			}
		],
		"instance": "",
		"name": "Generic Truchet",
		"outputs": [
			{
				"rgba": "$in(truchet_generic_uv($uv*$size, vec2(float($seed))))",
				"type": "rgba"
			}
		],
		"parameters": [
			{
				"control": "None",
				"default": 4,
				"label": "Size",
				"max": 64,
				"min": 2,
				"name": "size",
				"step": 1,
				"type": "float"
			}
		]
	},
	"type": "shader"
}