Multitexture light limit

Hello everyone! I’ve been playing with multitexture(FINALLY GOT IT TO WORK! Sorry, am very exited as all my games look almost the same but run up to 20 times faster on my 7 year old laptop :smiley: :smiley: :smiley: :D), but I’ve come across a problem. There seems to be a limit to the number of lights Multitexture can handle(8).

I remember looking through the source codes Shaders(I’ll edit this once I find the file, maybe one of you could compile for me(That would be really nice :D)) and the maximum number of lights is defined there, but I can’t get the game engine to compile anyway so it doesn’t help much :P. Are there any builds with a larger number of lights, or will I have to just move the lights around as the player moves? Thanks!

(to me seem more than 8 but i can be wrong)

give yet a chance to GLSL :
try to disable “specular” on almost all lights since is this the bottleneck
(maybe you can keep one hemi with this option that giver pretty much the same effect)
to me seem a very good compromise as eye-candy/framerate

Sadly glsl runs at about 20fps with the default cube scene, any decent scene its a no-no for me :P. What would be great is a glsl mode but with vertex lighting and things like that :smiley:

As far as I remember the limit of 8 dynamic lights is per layer.

BUT each light eats an enormous amount of performance when calculating the shading. Therefore it is better to have as less lights as possible. With that background, this technical limit is not that bad.

I didn’t notice any slowdowns, but I guess on computers even older than mine it might be a problem lol :). Thanks for your help, I’ll see if I can make-do with less lights :slight_smile:

8 lights is a magic number from the original versions of OpenGL. 8 was the minimum number of lights that OpenGL was required to support (or was it the max…). Some cards might support more than 8 lights but you have to dynamically figure that out at run time. Most people just assumed 8 lights so they didn’t have to have different scene layouts to increase/decrease the light count.

Even if you got Blender to compile with more than 8 lights, it would be dependent on your card being able to support that number of lights in the fixed-function pipeline (aka Single texture and multi-texture modes).