Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Cascaded shadow mapping and split values

  1. #11
    Intern Newbie
    Join Date
    Jan 2014
    Posts
    33
    I'm not doing any object culling, but I'm not adjusting the frustrum either to fit objects within it either. I tried simply multiplying the frustrum size by two and it seemed to help abit, but the resolution gets screwed.

    Is it necessary to enlarge the frustrum to fit the objects within it, and is there a good example/alghoritm to do so?

  2. #12
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,336
    Quote Originally Posted by TheKaiser View Post
    I'm not doing any object culling, but I'm not adjusting the frustrum either to fit objects within it either. I tried simply multiplying the frustrum size by two and it seemed to help abit, but the resolution gets screwed.

    Is it necessary to enlarge the frustrum to fit the objects within it, and is there a good example/alghoritm to do so?
    Just to be clear, we're talking about the light-space frusta here used to render your shadow maps. Let's take the different sides of those light-space frusta in-turn.

    First, the "sides" of each light space split frustum (left/right/bottom/top) generally should encompass the view-space split's bounds (in light space). Same thing with the "far clip plane" of each light space split frustum.

    The "near clip plane" of the light space split frustum is a big different though. You can start with it encompassing the view-space split's bounds (in light space) like the other clip planes. But in general this near clip plane needs to be pushed back toward the light far enough so that it includes all the potential casters between the light source and the view frustum split.

    The reason for these light-space frustum bounds is so that the resulting light-space frustum encompasses all of the objects that could potentially cast a shadow onto a portion of an object within that view frustum split.

    These bounds are robust, but they're just a starting point. You may decide to adjust them to satisfy some other goals in parallel (e.g. tighten them up based on your knowledge of where the casters and receivers are to maximize shadow map resolution/precision, and/or quantize them in some way for instance to eliminate edge flickering for some objects). But the main thing is that your light-space frusta need to encompass all casters that could potentially cast a shadow into a portion of a receiver object in that view frustum split.

Posting Permissions

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