My first ever 2d filter!
add brightness and contrast to you drab game with this filter. The tweak-able values are in the script to change the brightness and contrast. I hope you enjoy this very first 2d filter of mine! More coming soon.
By the way, hold space to toggle the filter on and off.
Tile texture from Textures.com
Nice idea. I did a lot of post processing in game engines but never BGE.
You should really avoid series of if statements since they perform poorly (they also tend to introduce artifacts like banding). Try to use functions suited for GPUs instead.
Here's a very simple brigthness/contrast shader which should do a better job: Screenshot
Wow thank you, that looks so much nicer.
I did not understand your use of
color = ((color-0.5)*max(contrast,0))+0.5;
because that made it so a contrast of 1 and a brightness of 1 were not default color so I change it to
color = ((color-1)*max(contrast,0));
Looks awesome! Looking forward to more ; )
Cheers, Rex