Hello,
I am looking to create some lights on a 2D game screen, so I can change a game from daytime to nighttime and back. Set a few point of light that give light when dark, no specific points during daytime (so remove the extra light when not needed). Then possibility to fade from one to another (day to night and night to day). Also, I would like to have the effect impact most of the objects (sprites) drawn on the screen but not all (e.g., HUD elements do not go dark).
Was looking through the shader thread for something I could use.
This one from baxslash seems promising: https://forum.thegamecreators.com/thread/213453
But setting the ambient value on this does not work quite as I was hoping. Setting ambient values to 1.0 makes the whole screen white, except for the area around light sources. I would expect it to make the screen look like the background image with its normal (unchanged) colors. The code seems to use SetSpriteColor() but I could not find how to make SetSpriteColor take "percentage of normal colour" instead of absolute values. Also, like I said, I would like to see this on whole screen except the GUI elements on top (HUD or whatever one might call it). Not sure if SetSpriteColor does that other than for a single sprite..
Any ideas on how to make this happen?
Thanks,
T