Hello all,
I have done some experimenting with SFML and shaders. The goal is to make a sprite to be surrounded with a colored glowing light. Following the example in
http://thedaftdev.com/entry-13-SFML-and-shaders.-.htmlI manage to get the shader working. I draw first all sprites and a green background to a RenderTexture, from which I take the drawn texture with getTexture() and make it a sprite. Then I draw this sprite to RenderWindow using the shader and blendMode BlendAdd. This all works well but the glowing light is supposed to be red but when it is blended with green background it appears to be yellow. With black background the light is red. This is all fine, the colors are numbers and add up like that, but the question is, how I can make the light to be the color I want regardless of the background? I am sure this is a well known problem and has good answers already, but they seem to be hard to find.
Thanks for the great library, SFML is awesome!
Regards,
ast