Hi, I'm not quite sure whether there is already such a blend mode or not. I also don't know how to build my own
sf::BlendMode.
Here's what I want to do: I draw shadows using a vertex array of black triangles onto a white rendering buffer. Each vertex array contains all shadow triangles referring to one light source. When drawing the array via default blend mode, both shadows are united. When applying
sf::BlendMultiply, they are also united, but the intersection part is made darker by the multiplication.
Because I'm going to build a coop-game, I want the shadows to intersect only. I added two screenshots (default blend, multiplicative blend) and a gimp-made example of what I tried to describe ^^
The example contains black lines, which indicate the lines of sight from each light source / player to each visible edge.
Is there already such an "BlendIntersect" or "BlendAnd" mode? I haven't found it, yet
About the multiplicative one: I know it's not working correctly, because I'm using not only the visible edges (I use all for simplicity). So I'd like to draw the entire array (which triangles might overlap, but those overlaps should be done by default blending) to the buffer using an intersection/and mode.
Kind regards
Glocke