SFML community forums
General => Feature requests => Topic started by: oomek on April 22, 2017, 11:45:12 am
-
I'm sorry for digging out that old thread but this is the only thread I could find which mentioned an overlay blending mode in SFML. I use:
BlendMode(sf::BlendMode::DstColor, sf::BlendMode::SrcColor).
This works great, but the problem I'm having is that I have no way of controling the opacity of the effect, I've tried also:
BlendMode(sf::BlendMode::DstColor, sf::BlendMode::SrcColor, sf::BlendMode::Add, sf::BlendMode::SrcAlpha, sf::BlendMode::Zero, sf::BlendMode::Add);
But this seem not to work either. Is there any other way I could try to control the opacity in that mode?
-
I have split your post into its own topic, as it had nothing to do with the original thread (https://en.sfml-dev.org/forums/index.php?topic=1071.0).
Please don't post in topics that are 8 years old and don't have anything to do with your post, except for mentioning some detail. ;)
So, how about you explain first, what your final goal is. Maybe someone will know a better solution or maybe a shader would work better.
-
If you are talking about the overlay blend mode:
http://blog.datacolor.com/wp-content/uploads/2014/03/Duggan_BlendModes_09.jpg
Then a shader is more suited for it:
https://wikimedia.org/api/rest_v1/media/math/render/svg/e8efed48f28a3e91bd98601d16661f92216305ca
Source: https://en.wikipedia.org/wiki/Blend_modes
Also, this shouldn't be in "feature request".