i’m trying to get the union of two transparent spheres. my first idea was to solve it at the geometry level but refused it afterwards because I think it will get too slow. then i thought about doing it with the stencil buffer and stumbled about CSG with stencil buffer.

would it be possible to get the union of two transparent spheres with help of the stencil buffer? maybe someone can point out the first steps or can give me a rough overview?

I’m not sure that you can use the fact that they’re the same z coordinate easily (though I haven’t exactly thought it through, it’s just a little difficult to imagine the precise advantage) but you probably can make use of the fact that you’re only calculating a union. Most of the paper, if I recall correctly, deals with intersections and differences and reducing them to a tree with “easy” union renderings at the root; since you’re only calculating unions you might be able to skip most of the tricky bits.