PDA

View Full Version : Shadow Mapping for directional lightsource



somboon
02-11-2007, 07: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.
(http://en.wikipedia.org/wiki/Shadow_mapping)
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

Thank

VCarnage
02-14-2007, 11: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.