create a dynamic mask to control saturation
I'll try to explain my need as precisely as possible. I'm doing a 2d game and I want to control the saturation (eventually value and hue) of each pixel dynamically. For example when a healthbar is full, a big radius around the character2d would be bright and saturated. When the healthbar is low, the radius drops (eventually flicker, like a dying candle). Some other diegetic objects (interactuable objcts) non-diegetic ones(the healthbar) should as well "cast" some saturation. I know how to pilot saturation with a shader, but how to create the grayscale map of saturation ? hereafter some images to try to be more explicit.
I have no idea where to start. Are there some nodes that do that ? lights with options I'm not aware of ? Or should I generate the mask ? How ?