I started using dynamic area lights for the first time. They look better, and I think they make more sense than point/spot lights when joined with other lighting methods e.g. radiosity, shadows. At the very least they “should” be more inline with the goals of my current project.
For shadow maps, I am rendering them all to a large texture. I plan on storing all the light data in a single UBO or SSBO and using uniform integers to reference into those arrays. I am limiting each face to be affected by no more than 4 lights (might be temporary). So each face could need up to four light matrices passed as uniforms to the shader. I could also store those matrices in the UBO/SSBO. I am on the fence about that. Its not a lot of memory in the grand scheme though it still irks me. I haven’t done any performance checks, but my gut tells me it will be faster to just generate those on the fly on the CPU and pass as uniform variables.
I have implemented the shadow map rendering. Once I have the actual shadow rendering I will post pictures.
Pingback: Shadow Maps Working | Coder187 DevBlog