Original Post
I am now trying to code a complex lightmodel shader to handle all types of lights in my engine. I want to support unlimited amount of lights. Lights *will* be additive, so a loop inside the shader should do the job. The problem is: how to transfer the light parameters from C++ into GLSL. I know I could do it with mat4 and decode it somehow inside the shader, this solution is ugly and limited though ... Can I use some "elegant" way of doing that? btw: I know about gl_LightSources array, but that is limited and kinda unextendable. [Edited by - kulik on October 5, 2005 11:11:43 AM]