2D filter: PseudoBloom

Hi there, i was reading the 2d filter tutorials from SolarLune (who i have to thank for most of my learning in bge) when i came up with this little thing.
A pseudo-Bloom filter. It’s not as impressive as a real bloom filter, but is simplier and lighter in code.
Here’s the code:


uniform sampler2D bgl_RenderedTexture;
void main(void)
{
    float value = 0.0003;
    
    vec4 color = texture2D(bgl_RenderedTexture, vec2(gl_TexCoord[0].st.x + value, gl_TexCoord[0].st.y + value));
    vec4 color_orig = color;
    color += texture2D(bgl_RenderedTexture, vec2(gl_TexCoord[0].st.x - value, gl_TexCoord[0].st.y - value));
    
    color*=color_orig;
    
    gl_FragColor = color;
}

As you can guess, i only needed the first tutorial, about a blur effect, to make this.
Now that’s what i achieved implementing it in my game, before and after:


So thanks to Solarlune for his tutorials, and thanks to everyone for reading. Feel free to use or modify it~

Cool, by the picture I can t see if its too mutch bloomy, but looks intresting, thanks for share, and your game looks pretty intresting.
Congratulations for that and thanks a lot for sharing with us!

Interesting - it looks more like a contrast filter to me. The darks have gotten darker, and the lights lighter. Try sampling just a couple more times to get an even amount, and add the blooming color to the original color to just get the bloom, and not darken colors. It looks good, though.