Im currently using this shader but it doesnt do much, and when i change the values it screws the image
#version 120
uniform sampler2D framebuffer;
#define glaresize 0.008 // 0.008 is good
#define power 0.5 // 0.50 is good
void main()
{
vec4 sum = vec4(0);
vec4 bum = vec4(0);
vec2 texcoord = vec2(gl_TexCoord[0]);
int j;
int i;
for( i= -2 ;i < 2; i++)
{
for (j = -1; j < 1; j++)
{
sum += texture2D(framebuffer, texcoord + vec2(-i, j)*glaresize) * power;
bum += texture2D(framebuffer, texcoord + vec2(j, i)*glaresize) * power;
}
}
if (texture2D(framebuffer, texcoord).r < 2.0f)
{
gl_FragColor = sum*sum*sum*0.0080+bum*bum*bum*0.0080+ texture2D(framebuffer, texcoord);
}
}