1
Graphics / Premultiplied Alpha Blending
« on: June 07, 2013, 04:35:02 am »
I am currently trying to deal with alpha haloing on transparent textures. I realize this can be fixed in the drawing tool by bleeding colors and adding alpha channels but this seems like a lot of tedious work that can be solved with a few lines of code.
It looks easy enough to premultiply using sf::Image, the issue is the blending mode. As I understand it this is unavailable due to philosophical reasons. While I and others may disagree with this, the problem remains of how to extend this myself.
There does not seem to be any way to override the currently blending behavior besides tricking the cache into thinking it has not changed. I would rather not do this, or recompile the source myself, but I don't see any obvious alternatives. Thoughts?
It looks easy enough to premultiply using sf::Image, the issue is the blending mode. As I understand it this is unavailable due to philosophical reasons. While I and others may disagree with this, the problem remains of how to extend this myself.
There does not seem to be any way to override the currently blending behavior besides tricking the cache into thinking it has not changed. I would rather not do this, or recompile the source myself, but I don't see any obvious alternatives. Thoughts?