     }
     else
     {
-        for(int i = 1; i < 5; ++i)
+        for(int i = 1; i < 10; ++i)
         {
             result += texture(texture0, TexCoords + vec2(0.0, tex_offset.y * i)).rgb * weight[i];
             result += texture(texture0, TexCoords - vec2(0.0, tex_offset.y * i)).rgb * weight[i];

    vec3 result = texture(texture0, TexCoords).rgb * weight[0]; // current fragment's contribution
    if(horizontal == 1)
    {
        for(int i = 1; i < 5; ++i)
        {
            result += texture(texture0, TexCoords + vec2(tex_offset.x * i, 0.0)).rgb * weight[i];
            result += texture(texture0, TexCoords - vec2(tex_offset.x * i, 0.0)).rgb * weight[i];


uniform int horizontal;

//const float weight[5] = float[] (0.227027, 0.1945946, 0.1216216, 0.054054, 0.016216);
const float weight[10] = float[] (0.220008, 0.188977, 0.119759, 0.055986, 0.019304, 0.004908, 0.00092, 0.000127, 0.000013, 0.000001);
// source: https://learnopengl.com/#!Advanced-Lighting/Bloom
void main()
{             
