• Advertisement
Sign in to follow this  

Direct3D light limit

This topic is 3712 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So, it seems that everyone "knows" that Direct3D has a limit of 8 lights. And sure enough, all the video cards that I have (2) allow 8 lights. (Though in software vertex processing mode they allow infinite lights, which isn't surprising). However, as far as I can tell, the documentation merely states that the caps structure describes the maximum number of lights. Is the number 8 just an unwritten rule that all of the video adapter vendors have agreed on? Or have I missed something? And, is there any danger of running into a card with a different number of lights allowed? Thanks, Geoff

Share this post


Link to post
Share on other sites
Advertisement
If you are referring to the fixed function pipeline, then yes, you are only allowed to have 8 lights enabled at any given time, however you are allowed to define an unlimited amount of lights. You are only allowed to have 8 of them enabled at any given time.

With the Programmable Pipeline(e.g. Shaders) you can have as many lights as you want.

I hope this helps.
take care.

Share this post


Link to post
Share on other sites
When hardware transform was introduced in DX7 with the original GeForce256 card, it supported 8 lights. Everyone else just sort of said "Seems like a good number", and stuck with it. It could vary by card, but it never has.

Share this post


Link to post
Share on other sites
IIRC this actually comes from the SGI days and OpenGL (or even GL before it). Since all OpenGL programs used this limitation, and hardware accelerated T&L OpenGL existed long before T&L in D3D, I guess hardware makers didn't see a reason to change the number for D3D.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement