{
	"name": "supersample",
	"node_position": {
		"x": 0,
		"y": 0
	},
	"parameters": {
		"count": 2,
		"size": 9,
		"width": 1
	},
	"seed_int": 0,
	"shader_model": {
		"code": "",
		"global": "",
		"inputs": [
			{
				"default": "vec4(1.0, 1.0, 1.0, 1.0)",
				"function": true,
				"label": "",
				"longdesc": "The input image",
				"name": "in",
				"shortdesc": "Input",
				"type": "rgba"
			}
		],
		"instance": [
			"vec4 supersample_$(name)(vec2 uv, float size, int count, float width) {",
			"\tvec4 rv = vec4(0.0);",
			"\tvec2 step_size = vec2(width)/size/float(count);",
			"\tuv -= vec2(0.5)/size;",
			"\tfor (int x = 0; x < count; ++x) {",
			"\t\tfor (int y = 0; y < count; ++y) {",
			"\t\t\trv += $in(uv+(vec2(float(x), float(y))+vec2(0.5))*step_size);",
			"\t\t}",
			"\t}",
			"\treturn rv/float(count*count);",
			"}"
		],
		"longdesc": "A filter that samples sub-pixel details to make them visible",
		"name": "Supersample",
		"outputs": [
			{
				"longdesc": "Shows the supersampled image. Due to the performance cost of this node, it is recommended to connect a buffer directly to this output.",
				"rgba": "supersample_$(name)($uv, $size, int($count), $width)",
				"shortdesc": "Output",
				"type": "rgba"
			}
		],
		"parameters": [
			{
				"default": 10,
				"first": 4,
				"label": "Size",
				"last": 12,
				"longdesc": "The resolution of the output",
				"name": "size",
				"shortdesc": "Size",
				"type": "size"
			},
			{
				"control": "None",
				"default": 2,
				"label": "Count",
				"longdesc": "The number of samples on each axis. High values will badly impact performances.",
				"max": 5,
				"min": 2,
				"name": "count",
				"shortdesc": "Count",
				"step": 1,
				"type": "float"
			},
			{
				"control": "None",
				"default": 1,
				"label": "Width",
				"longdesc": "The width of the sampled area. Setting this value higher than 1 will sample neighbouring pixels and antialias the result.",
				"max": 2,
				"min": 1,
				"name": "width",
				"shortdesc": "Width",
				"step": 0.01,
				"type": "float"
			}
		],
		"shortdesc": "Supersample"
	},
	"type": "shader"
}