View Full Version : Shadow Mapping for directional lightsource

02-11-2007, 06:09 PM
I have a some question regarded to implementing shadow map.

Now I have use Perspective Projection for capturing light view for a directional light soure
, but the projection failed to capture all the area need to be shadow.

Later , I searched on the Internet and found article about shadow map On WIkipedia.
It said that I should use Orthogonal Projection for directional light source

Can Someone Provide me more information on this , including how to setup Orthogonal Projection


02-14-2007, 10:09 AM
Yes if your light source is directional, like the sun, you only need an orthogonal projection.

Search for glOrtho function for setting up ortho projection. Just make sure your projection includes all the objects you care about.