Maximum number of lights?
by Doug Hamilton · in Torque X 2D · 07/03/2009 (6:58 am) · 3 replies
I've been playing around with TXB for a while now, and I was just working on a level that ended up with over 8 SceneObjects that each have a T2DLightComponent on them, and each component has only 1 point light. But, when I run the game, only the last 8 lights I added to the scene actually do anything, the rest of them seem as if they're disabled. I was under the impression that I could use as many T2DLightComponents as I wanted, is this simply not the case? Can I only use 8 lights in any given scene?
About the author
#2
07/03/2009 (5:41 pm)
Ah, ok that would make sense. Is there any way around this? Is there a system built in already that would select only the 8 closest lights to the camera, and enable only those?
#3
07/04/2009 (10:50 am)
I think the 8 lights limit is connected to DirectX's Fixed Functions Pipeline. However TX's shader LightingEffect2D.fx has a limit of 8 lights - maybe that it the limitation you see.
Torque Owner Gavin Beard
I do believe that DirectX has a limit of 8 lights, so as TX is built in DirectX it to has this limit.
there is a little info here:
http://www.gamedev.net/community/forums/topic.asp?topic_id=473047