I'm working on light management in my forward rendering pipeline. I've looked all over for tutorials or examples, but everything is just a single directional light, or 8 or 16 point lights. The main problem is that I want to have a large number of lights in the scene of different types (point, spot, directional). For opaque objects I'm solving this with deferred shading, but for transparent objects I need a forward rendering pipeline so I'm writing it first. Basically I need to determine which 8 or 16 lights are going to affect each pixel. I tried sorting lights based on the influence on the center point of the object being rendered (mostly distance based) but the problem with that is that large objects like houses don't get proper shading. I cull point and spot lights that are outside of the view frustum and don't even bother considering them for the current frame, so for large scenes that cuts out potentially hundreds of lights all at once from consideration. The only thing now is that I need to be able to pick out which of these last few lights will shade a particular fragment. If I have to do it per-object on the CPU then that will have to work, but is there any fast way to pick out lights in the vertex shader and pass on indices to the fragment shader? That way I could send a list of like 128 lights and only accumulate like 8 or 16 for each pixel. If anyone has approaches they've used that were successful I'd love to hear, because I can't find anything on Google about light management.