I’m trying to implement multi-light shadow mapping w/ glsl, and I’m a little confused. I’ve implemented single light mapping by using a FBO to render to a texture.
It seems like the way to extend it to many lights is to render to an array texture but I don’t understand how to render to a particular layer. How would I go about doing something like this:
allocate an array texture
for each light source
render to a layer of the texture
pass the arrayTexture to my frag shader