Hello everybody!
I wanted to give the newly implemented blend modes a try and see if they can solve an issue cleaner than what I use right now (a shader). What I am trying to acchive is that a render texture fades out over time.
So my idea is to simply draw a black rect with very low alpha over the entire render texture each frame to make it slowly fade. When I use the default alpha blending mode I get weird visual artefacts. (it seems to be related to some value being very small and causing problems when multiplyed; seems to be a know problem) Thats why I wanted to try a subtractive blend mode.
I tryed to simply take the Alpha Mode and exchange the blend function from add to subtract, but that didn't work.
const sf::BlendMode BlendSubtractive(sf::BlendMode::SrcAlpha, sf::BlendMode::OneMinusSrcAlpha, sf::BlendMode::Subtract,
sf::BlendMode::One, sf::BlendMode::OneMinusSrcAlpha, sf::BlendMode::Subtract);
I am a little confused to what option to choose. Could somebody with a better OpenGL knowledge explain the correct way to me?
Thanks in advance,
Foaly