{
	"name": "noise",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"density": 0.5,
		"size": 4
	},
	"shader_model": {
		"code": "",
		"global": "float dots(vec2 uv, float size, float density, int seed) {\n\tvec2 seed2 = rand2(vec2(float(seed), 1.0-float(seed)));\n\tuv /= size;\n\tvec2 point_pos = floor(uv)+vec2(0.5);\n\tfloat color = step(rand(seed2+point_pos), density);\n    return color;\n}",
		"inputs": [

		],
		"instance": "\n\t\tfloat $(name)_f(vec2 uv) {\n\t\t\treturn dots(uv, 1.0/$(size), $(density), $(seed));\n\t\t}",
		"longdesc": "Generates a grid made of black and white squares",
		"name": "Noise",
		"outputs": [
			{
				"f": "$(name)_f($(uv))",
				"longdesc": "Shows the noise pattern",
				"shortdesc": "Output",
				"type": "f"
			}
		],
		"parameters": [
			{
				"default": 8,
				"first": 2,
				"label": "Grid Size:",
				"last": 12,
				"longdesc": "The grid size",
				"name": "size",
				"shortdesc": "Size",
				"type": "size"
			},
			{
				"control": "None",
				"default": 0.5,
				"label": "Density:",
				"longdesc": "The density of white squares",
				"max": 1,
				"min": 0,
				"name": "density",
				"shortdesc": "Density",
				"step": 0.01,
				"type": "float"
			}
		],
		"shortdesc": "Noise pattern"
	},
	"type": "shader"
}