{ "name": "gaussian_blur_y", "node_position": { "x": 0, "y": 0 }, "parameters": { "sigma": 35.700001, "size": 9 }, "shader_model": { "code": "", "global": "", "inputs": [ { "default": "vec4(1.0)", "function": true, "label": "", "name": "in", "type": "rgba" }, { "default": "1.0", "function": true, "label": "", "name": "amount", "type": "f" } ], "instance": "vec4 $(name)_fct(vec2 uv) {\n\tfloat e = 1.0/$size;\n\tvec4 rv = vec4(0.0);\n\tfloat sum = 0.0;\n\tfloat sigma = max(0.000001, $sigma*$amount(uv));\n\tfor (float i = -50.0; i <= 50.0; i += 1.0) {\n\t\tfloat coef = exp(-0.5*(pow(i/sigma, 2.0)))/(6.28318530718*sigma*sigma);\n\t\trv += $in(uv+vec2(0.0, i*e))*coef;\n\t\tsum += coef;\n\t}\n\treturn rv/sum;\n}", "name": "Gaussian blur Y", "outputs": [ { "rgba": "$(name)_fct($uv)", "type": "rgba" } ], "parameters": [ { "default": 9, "first": 4, "label": "Size", "last": 12, "name": "size", "type": "size" }, { "control": "None", "default": 0.5, "label": "Sigma", "max": 50, "min": 0, "name": "sigma", "step": 0.1, "type": "float" } ] }, "type": "shader" }