Sign in to follow this  
treeway

1 shadow map per light?

Recommended Posts

treeway    108
Hi Ive implemented shadow mapping, its working for one light, am i right in thinking that to do multiple lights i have to create 1 shadow map per light and render the scene again for each light?

Share this post


Link to post
Share on other sites
MJP    19754
Yes, you'll need to render the scene once from the point of view each shadow-casting light source. Actually point lights require you to render the scene 6 times per light, at least if you're using the standard cubemap method.

As a side note...when you have many shadow casters, you'll want to make sure you're only rendering the objects that are going to cast or receive shadows from that particular light source. You'll also want to make sure that a light's entire volume is visible on screen, so that you're not wasting time rendering shadow maps for lights that aren't even visible. You can do this via frustum culling, or some other method.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this