Jump to content
  • Advertisement
Sign in to follow this  
Subotron

CG Shadowing: using multiple lights

This topic is 4157 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

I am trying to implement CG shadowing to give my models a nice shadow. However, I currently have a design issue. The shader uses light info to generate the shadows. This means I pass a few parameters to the shader, like the position of the light. However, I was uncertain how to adjust the shader to work with multiple lights. Think about walking past street lights, where you have more than one shadow when you walk in between lights, or just cancellation of a shadow because of another light. I was wondering if it is possible to adjust my shader to allow more lights, and what would be the best way to pass the light info to the shader (I do not like the idea of passing 16 parameters or so just for light info). Any pointers would be great. Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
u havent said what method u use for shadowing
eg shadowmaps, stencil shadows etc
if its SMs then u will need to access a different SM for each light

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!