I finally finished upgrading my lighting system, inspired by Spartan engine's implementation. All 3 light types get converted into the SB_Light uber struct which are packed into an array and uploaded to the gpu. This completely fixed my "payload" dilemma. The fragment shader uses a bit flag to discern the light type and which data to use. I simply loop through the lights and accumulate their contribution. The number of lights is sent through a push constant. I upgraded to slang just so I could create member functions. It's a lite version of Spartan engine which loops the lights inside the render loop itself and does one compute dispatch per light given it isn't disabled or distance culled. Next up is adding a cubemap which means refactoring my texture class. I also need to create a proper render target object for stuff like the render image, depth images, etc. images that I actually write to.

In the video you'll notice the back faced lighting is white. I don't remember if my old code had that and I'm not sure if I should bother fixing it. I think I know what's causing it. There's no shadows either and I don't know when I'll address that if at all before ray tracing. I probably will though for learning purposes. Anyway here's the fragment shader for those interested: https://pastebin.com/QSUnn8f5