1 shadow map per light?

Started by
1 comment, last by jollyjeffers 16 years, 5 months ago
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?
Advertisement
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.
Regarding MJP's last comment, read Advanced Light and Shadow Culling Methods by Eric Lengyel from GDC'06 - it's a good coverage of this aspect of rendering.

Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

This topic is closed to new replies.

Advertisement