Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Number of Lights


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 fs1   Members   -  Reputation: 338

Like
1Likes
Like

Posted 08 July 2014 - 03:03 PM

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

Sponsor:

#2 HappyCoder   Members   -  Reputation: 2885

Like
6Likes
Like

Posted 08 July 2014 - 04:32 PM

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.


Edited by HappyCoder, 08 July 2014 - 04:33 PM.


#3 fs1   Members   -  Reputation: 338

Like
1Likes
Like

Posted 08 July 2014 - 04:57 PM

Thanks for the information and clarification.

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

Thanks!

Federico

#4 kauna   Crossbones+   -  Reputation: 2861

Like
2Likes
Like

Posted 08 July 2014 - 08:12 PM

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

 

Should this help a bit?



#5 unbird   Crossbones+   -  Reputation: 6020

Like
4Likes
Like

Posted 08 July 2014 - 09:44 PM

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.

#6 fs1   Members   -  Reputation: 338

Like
2Likes
Like

Posted 09 July 2014 - 05:15 AM

Thanks HappyCoder, kauna and unbird.

 

Very helpful answers!

 

Regards



#7 cozzie   Members   -  Reputation: 1771

Like
1Likes
Like

Posted 11 July 2014 - 03:02 PM

You might wanna check this out too:

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



#8 mhagain   Crossbones+   -  Reputation: 8284

Like
0Likes
Like

Posted 11 July 2014 - 05:16 PM

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


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#9 fs1   Members   -  Reputation: 338

Like
0Likes
Like

Posted 12 July 2014 - 04:28 AM

Thanks for your Insights.
Regards,
Federico




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS