I do not have a lot of experience with shaders in any engine, but I would like to learn how to create them. The thing I want to create is (I presume this is) a shader that makes anything a certain light doesn't touch desaturated. The light will be placed where on the player position and rotated to where the player rotates to, essentially creating a psuedo-line of sight effect. I want to expand upon this later, but for now this will suffice. Could anyone assist me with this? I can't find any examples of code where you get a shadowmap that you use for a shader. In the end, I'd like to end up with something like this: http://tycho.terryn.be/files/LOS/
What I would do is make a shader that lerps between two textures(one desaturated, one not) based on light intensity.
Yeah that sounds logical. Is there a way to get a texture/map based on one (or several) selected light, instead of all lights?