Member-only story
Desaturation Shader in OpenGL
How to implement an easy desaturation post-processing effect
One of the easiest post-processing effects you can add to your game is a desaturation effect. There are many situations where a desaturated image can improve the final look of the game. For example, if the time of the game is set somewhere between the '50s and '90s, where cameras already existed but didn’t produce high-quality images yet. Movies or photos from that timeframe look a bit desaturated, so it makes sense to add a desaturation effect to the game to make it look like it fits into that era.
Besides using it for historic accuracy, there are a lot more situations where desaturation makes sense. If a game is very emotional or melancholic, a slightly less saturated look can help convey the desired emotions. Or even in a shooter game when the player is eliminated, the screen can be turned gray to indicate that. In my case, I added it for my Viking map, where I wanted a more overcast feeling, but no matter how I changed the lights the bright trees never fit. With the desaturation effect it is a lot easier to create a gray and overcast weather look. These are just a few use cases from the top of my head. There are a lot more situations where a desaturation effect can come in handy.
While it is certainly possible to bake the desaturated look into the textures or colors of the assets, it requires a large company where the assets are produced specifically for a game. Smaller teams or indie developers may not…