I'm currently experimenting with simple lighting in my game made with SFML and C++ (though I don't think that's relevant to the question). It's my first time messing with lighting in 2D, and my basic system is to:
- Create a lightmap
- Every frame, clear the lightmap and add all lights back to it (they move).
- Every frame, draw the lightmap to the window on top of the game and multiply the colors from both textures (the game texture and the lightmap texture). In SFML I do this by:
My issue is that my lights don't show up against a black background, which doesn't seem to make sense. It's as if that specific color (and colors close to it) just can't be illuminated. Is this because of how color multiplication works? If so, is there a workaround?