Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Shadow Mapping for directional lightsource

  1. #1
    Junior Member Regular Contributor
    Join Date
    Sep 2006
    Location
    thailand
    Posts
    130

    Shadow Mapping for directional lightsource

    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

  2. #2
    Junior Member Newbie
    Join Date
    Feb 2005
    Posts
    23

    Re: Shadow Mapping for directional lightsource

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •