I'm still learning DirectX from a book. It says that a graphiccards can only handle 15 lights. I'm just a bit confused , there are a lot of games using more lights, or are this just some alpha blending tricks or what ever?


1 Answer 1


Your title mentions DirectX 9, which is almost a decade old and a lot has happened in the graphics space since then.

I assume your book is referring to a limit on lights in the fixed function pipeline (FFP). I always thought there was a maximum of 8 lights in DirectX9 class FFP. But remember that this was 8 'active' lights, you could have many more lights but they did not have any effect until they were made active.

Current versions of Directx (and Opengl) have removed the FFP so they don't implicitly support any lights. All the lighting is done in the shader.

However modern shader programming, pretty much allow for unlimited number of lights.

Back in the day, a lot of lights would be simulated by things like "light mapping" (basically baking in the lighting into textures).

  • \$\begingroup\$ Well it says maximum of 15 for newer cards. So I can use more lights now? Or do I have some to render the lights in 2 frames? \$\endgroup\$
    – LaVolpe
    Nov 10, 2012 at 23:54
  • \$\begingroup\$ These days, the current version of DirectX doesn't have any lights. The FFP has been deprecated. All the lighting is done in the shader. As I said, the shader can have almost any amount of lights. \$\endgroup\$
    – Ken
    Nov 11, 2012 at 0:01
  • \$\begingroup\$ So it's also for the old HLSL 3 shader? fine. You've helped me \$\endgroup\$
    – LaVolpe
    Nov 11, 2012 at 0:03
  • \$\begingroup\$ Lightmapping is still very useful! Talk about performance (runtime cost=texturing!) and that's important for mobile platforms nowadays! \$\endgroup\$
    – bobobobo
    Nov 11, 2012 at 1:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .