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~
