BGE easy and beautiful 2D shaders, + demo!

So, I really hate 2D shaders because I have a hard time finding good ones, and now that I have, I’d like to share them with you guys! But that’s not all, because I also have a demo scene with nice lighting and the shaders included, just to give an example of realtime lighting setup combined with shaders! And one more thing, I’d prefer if you used the standalone button when playing the game to get full resolution and working SSAO.

Blend file: https://www.dropbox.com/s/78kec9k5c4htwm8/BGE%20graphics%20demo.blend?dl=0

As for the 2D shaders, all you need to do is download the .txt files, open them in blender, insert them into the 2D filter logic brick (set to custom), add a sensor for it and done! the only different one is the DOF shader.

For the DOF shader, use the “dof_depthblur.txt” in a custom shader, then use “readDepth.txt” and “readLuminance.txt” into seperate python logic bricks, then plug them in to an always sensor set to true “pulse mode”.

Here are the shaders and their scripts:

Bloom: https://www.dropbox.com/s/g5o9faj4uht6zax/Bloom.txt?dl=0

Chromatic aberration: https://www.dropbox.com/s/g14k22x8sk38rgm/ChromaticAberration.txt?dl=0

SSAO:https://www.dropbox.com/s/c2vsxt2rzfcxvog/SSAO.txt?dl=0

DOF scripts: https://www.dropbox.com/s/pnm93ohnrdk92bo/dof_depthblur.txtdl=0
https://www.dropbox.com/s/9pxbhm7ebcra0t8/readDepth.txt?dl=0
https://www.dropbox.com/s/mqjzcsvkjoxbaso/readLuminance.txt?dl=0

P.S. Sorry for the long links! I don’t usually use all the text tools like links and scripts, etc.

Very nice!
I will certainly be using your bloom shader for my current project (and any other project that would need it). The old bloom filter I used made my game run at 30fps. Your bloom shader not only looks a lot better, it runs a smooth 60fps. Bravo!

I would also like to possibly incorporate the DoF filter, although I would want to modify the code to handle the focal point. Is there a way you could have the focal point be set to the worldPosition of an object?

This .blend runs at 16 FPS in small window without filters. I may rather like to see an example for low-end GPUs.