#version 100
#define SECONDBLUR
#define BLURSIZEW 2.5
#define BLURSIZEH 2.5
#define BLURSTEPW 0.5
#define BLURSTEPH 0.5
#define CC cos(0.785)
#define SS sin(0.785)
precision mediump float;uniform float factorTex;uniform float factorPix;uniform vec2 
iResolution;uniform sampler2D tex0;uniform float scale;vec2 iPixResolution = iResolution
/factorPix;vec2 iChannelResolution = iResolution/factorTex;vec2 texel = 1.0/
iChannelResolution.xy;vec2 pixel = 1.0/iPixResolution.xy;float factor = 32.0
/factorTex;float radius = 6.0 *scale / factorTex;vec3 tex(vec2 uv){return texture2D
(tex0, uv).rgb;}vec3 blur(vec2 uv){vec3 accumCol = vec3(0.0);vec3 accumW = vec3(0.0);
#ifdef SECONDBLUR
for (float j = -BLURSIZEW; j < BLURSIZEW; j += BLURSTEPW)for (float i = -BLURSIZEH;
i < BLURSIZEH; i += BLURSTEPH){float ii = CC*i-SS*j;float jj = CC*i+SS*j;vec2 offset
= pixel * vec2(ii + jj, jj - ii);vec3 col = tex(uv + offset * radius);vec3 bokeh =
vec3(1.0) + col * col * col * vec3(factor);accumCol += col * bokeh;accumW += bokeh;}
#endif
for (float j = -BLURSIZEW; j < BLURSIZEW; j += BLURSTEPW)for (float i = -BLURSIZEH;
i < BLURSIZEH; i += BLURSTEPH){float ii = i;float jj = j;vec2 offset = pixel * vec2
(ii + jj, jj - ii);vec3 col = tex(uv + offset * radius);vec3 bokeh = vec3(1.0) +col
* col * col * vec3(factor);accumCol += col * bokeh;accumW += bokeh;}return accumCol
/accumW;}void main(void){vec2 uv = gl_FragCoord.xy / iPixResolution.xy;uv.y = 1.-uv.y
;vec3 col = blur(vec2(0.0, 1.0) + uv * vec2(1.0, -1.0));float a = 1.0;gl_FragColor =
vec4(col,a);}