Lux Cymex Rendering Pipeline
Lux Cymex is a 3D puzzle platformer where the player uses the intersection of different colored light volumes to solve puzzles. The OpenGL renderer needed to be able to show unique particle effects over the exact space where intersections of spheres, cones, and cylinders of light intersected - which proved to be an interesting challenge to implement into a deferred shading, PBR pipeline.
The light volumes with unique effects upon intersection are RGB, and any combination of two or more colors has a unique effect. So through one way or another, these areas had to be written to the stencil buffer as a bitfield for the particles render pass to know where to draw. The initial idea was to use specialized constructive solid geometry algorithms to find these spaces, but that quickly proved to be unfeasible in real-time, particularly with the number of lights.