I would like to have vertex lighting for my models from all the lightsources in my map. For map geometry there would be lightmaps and for models vertex lighting (like in many games I think). The problem:
OpenGL supports only 8 lights at a time. I think it wouldn't be enough in some cases, especially if I would check only 8 closest to camera. Is there a way to get more than 8 lights, or can I just use GL_LIGHT0+n (n>8)?
The second problem: it seems that opengl lighting doesn't concider distance between model and lightsource, which is bad. Can this be fixed?
I think it wouldn't be such a big deal to write my own vertex lighting algorithm and passing it to vertex colors, but this way I would miss hw T&L.




