Ok, after giving my approach some more though this could work quite well (but it’s not perfect):
My first pass would have to avoid overlapping areas. This can be done with dest_alpha/inv_dest_alpha blending and solid alphas of the quads, but it wouldn’t be perfect…
Using a shader for the first pass AND blending could solve this problem. Since blending is done after fragment rendering we can output 100% alpha values for any transparencies above 0%. The alpha channel needs to be cleared after the first pass is completed.
This is how it would look like (I had no time for testing this in code, just photoshop…):
first pass using dest_alpha blending and shader:
second pass with blending and writing alpha values.
I hope this works in practice aswell! :o