SFML community forums
Help => Graphics => Topic started by: moistweb on June 18, 2014, 02:25:25 pm
-
Hello everyone,
in my Shmup game, and as every other Shmup games, enemies when getting hit tend to highlight in white for aesthetic purposes. I want to do the same, 'on the fly', without having to load a white version of the enemy sprite, that is, use color multiplication or some other technique. Unless the problem I found is that color multiplication doesn't produce a white color in the result. Any suggestions guys to achieve the result ?
-
Multiplication can only darken the result. Forget about it.
Your best solution is to use a pixel shader.
-
Pixel shader ? what's that ? I'm sorry but I'm not familiar with shaders, do you have any article or tutorials I can start with ? thanks for your reply
-
I'm pretty sure that the effect you are trying to achieve can be done with the new BlendModes that were recently implemented. Additive blending might do the trick, although you will have to tweak the blending parameters and source colours.
But as Laurent already said, nothing beats using shaders ;) although they might be a bit overkill for this application if using standard blending can work as well.
-
Thanks binary1248 I will search further on the topics you mentioned they seem interesting