General > Discussion

Dynamic Lights restriction

(1/1)

Crystan:
Why do we have a maximum of 7 dynamic lights? Iam sure modern PCs can support more than 7.

Sandro:
Artirfact of earlier rendering code -- it used OpenGL FFP lights, and the minimum possible count of those (defined by OpenGL spec) is 8. And since light #0 was used for the sun, only 7 lights remained to be available for dynamic lights.
Everything else would require dynamic checks on the number of available OpenGL lights, severely complicating the code.

This is a problem for a current code, too: max amount of light's data you can feed to the shader depends on hardware, and with the mess the current rendering code is, it will require a big coding effort to implement correct "maximum possible lights mode" in fail-safe way. So -- for now, let's stick with the safe maximum of 7 lights which should work on any GLSL-compatible hardware.

PS: Why would you need that amount of dynamic lights? 7 is pretty much enough IMHO.

Navigation

[0] Message Index

Go to full version