Number of Lights

Started by
7 comments, last by fs1 9 years, 9 months ago
Dear All

I read the below thread:

http://www.gamedev.net/topic/645569-shader-unlimited-lights/

What is a realistic limit for number of lights in D3D9 condidering the size of the constant buffers and the shader size?

And in D3D10?

Thanks

Federico
Advertisement

It depends on how much information you have per light.

Resource Limits DX10

There are the resource limits for directx 10. Of course, those values are the minimum. Some hardware will go higher.

If you are using forward rendering, you can in theory have an infinite number of lights by using multiple passes.

If you are using deferred rendering, something I would recommend if you plan on having lots of small point lights, then you can easily render many point lights.

My current game project Platform RPG
Thanks for the information and clarification.

Do you have a link or information about the resources limit on D3D9?

Thanks!

Federico

http://en.wikipedia.org/wiki/High-level_shader_language

Should this help a bit?

The exact limits for a particular card can be optained through IDirect3D9::GetDeviceCaps. "Funnily" even my DX11 capable card doesn't exceed the constant register limit of 256. Seems a hard limit.

As others have pointed out, you can always break such limits with a different approach: Using textures (on DX10+ transparently using typed or structured buffers) or multiple render passes.

Thanks HappyCoder, kauna and unbird.

Very helpful answers!

Regards

You might wanna check this out too:

http://www.gamedev.net/topic/657701-most-efficient-way-for-lighting-in-forward-rendering/

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

It also depends on how many of those lights you want to have casting shadows.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

Thanks for your Insights.
Regards,
Federico

This topic is closed to new replies.

Advertisement