I have a DX11 deferred renderer. I am using shadow maps, and need to add shadows for my point lights. Originally, I was going to use cube maps (and still might), but read about dual-paraboloid shadow maps. However, I read in "http://http.develope..._chapter09.html" that:
"There is another technique, called "dual-paraboloid shadow maps," but it is not generally applicable to deferred shading, because a nonlinear projection applied first at the vertex level and then at the pixel level can lead to major artifacts."
So I think that option is out. My concern is with the amount of memory with cube maps, and updating them for dynamic objects. What is the best approach here?
I'm thinking of using variance shadow maps so I can hopefully get away with low-resolution shadow maps and still get good results. This will help a bit on the resolution, although I have to store depth squared also, so the savings isn't as great.
I read some where about sharing cube maps for shadow mapping, but this means I have to update the shadow maps every frame even if no objects moved.
Should I be looking at workarounds like using a hybrid where I have a point light, but it casts a shadow like a spotlight?
omni shadows
Started by Quat, Yesterday, 05:40 PM
4 replies to this topic
Ad:
#2 Members - Reputation: 109
Posted Yesterday, 11:49 PM
Cube maps are a definitely better if you're using DX11. Dual parabaloid was, kind of a hack to get around things like having as many draw calls and etc.
With the geometry shader you can wrap the entire cubemap in a single pass: http://www.gamedev.n...irect3d10-r2735. Cubemaps are the most straightforward, and overall the best quality of any practical technique I've yet seen.
As for shadow filtering, the best I can think of is a screenspace deferred blur and scale the blur kernel to Z distance (from the cameras depth buffer) so that it's always a fixed amount of blur (temporally speaking). Unfortunately I don't precisely know how it's done, Wolfgang (formerly of Rockstar) and Carmack apparently have it working, but I've not seen a paper or any good reference on it. Still, as far as doing it as straightforward and relatively cheap as possible you can't get much better, and the idea isn't too hard. Here's a video at least: http://player.vimeo.com/video/42037689
With the geometry shader you can wrap the entire cubemap in a single pass: http://www.gamedev.n...irect3d10-r2735. Cubemaps are the most straightforward, and overall the best quality of any practical technique I've yet seen.
As for shadow filtering, the best I can think of is a screenspace deferred blur and scale the blur kernel to Z distance (from the cameras depth buffer) so that it's always a fixed amount of blur (temporally speaking). Unfortunately I don't precisely know how it's done, Wolfgang (formerly of Rockstar) and Carmack apparently have it working, but I've not seen a paper or any good reference on it. Still, as far as doing it as straightforward and relatively cheap as possible you can't get much better, and the idea isn't too hard. Here's a video at least: http://player.vimeo.com/video/42037689
Edited by Frenetic Pony, Yesterday, 11:50 PM.
#3 Moderators - Reputation: 2118
Posted Today, 12:00 AM
Frenetic Pony, on 22 May 2012 - 11:49 PM, said:
As for shadow filtering, the best I can think of is a screenspace deferred blur and scale the blur kernel to Z distance (from the cameras depth buffer) so that it's always a fixed amount of blur (temporally speaking). Unfortunately I don't precisely know how it's done, Wolfgang (formerly of Rockstar) and Carmack apparently have it working, but I've not seen a paper or any good reference on it. Still, as far as doing it as straightforward and relatively cheap as possible you can't get much better, and the idea isn't too hard. Here's a video at least: http://player.vimeo.com/video/42037689
There's an article in one of the GPU Pro books about screen space shadow filtering. Personally I'm morally opposed to doing things like this in screen space.
Edited by MJP, Today, 12:01 AM.
#4 Members - Reputation: 136
Posted Today, 02:28 AM
I don't think dual-paraboloid maps are always infeasible. They might serve you very well for omnidirectional point light shadows and more. There are, however, some drawbacks you have to count with:
- geometry needs to have a certain level of tessellation (otherwise it might not quite fit after re-projections)
- less precision because of the mentioned non-linear projections
The advantages may or might not outweigh the drawbacks:
+ possibly less memory than cube-maps (but you might want higher resolution)
+ rasterise the scene just twice for each light instead of six times
The geometry shader projection of vertices or pixel shader re-projection of fragments aren't much more difficult than with cube-maps. I'd try them out if I wanted to have MANY point lights with small resolution blurred (possibly rather imprecise) shadows. We're using them for layered environment maps for "ray-traced" reflections as well (both memory and speed were concerns), area lights (actually hundreds of "small" omni-lights with imprecise shadows) and now consider rewriting general omni-shadows with dual-paraboloid as well.
Still, there might be just too many artefacts you'll want to stay with cube-maps. You pick :-)
- geometry needs to have a certain level of tessellation (otherwise it might not quite fit after re-projections)
- less precision because of the mentioned non-linear projections
The advantages may or might not outweigh the drawbacks:
+ possibly less memory than cube-maps (but you might want higher resolution)
+ rasterise the scene just twice for each light instead of six times
The geometry shader projection of vertices or pixel shader re-projection of fragments aren't much more difficult than with cube-maps. I'd try them out if I wanted to have MANY point lights with small resolution blurred (possibly rather imprecise) shadows. We're using them for layered environment maps for "ray-traced" reflections as well (both memory and speed were concerns), area lights (actually hundreds of "small" omni-lights with imprecise shadows) and now consider rewriting general omni-shadows with dual-paraboloid as well.
Still, there might be just too many artefacts you'll want to stay with cube-maps. You pick :-)
#5 Members - Reputation: 517
Posted Today, 07:30 AM
Having shipped a couple major games that used dual-paraboloid shadows for point lights, I'm still a fan of the technique. Depending on your artwork, the tessellation requirement is usually over-stated. There is definitely some tuning to get things to look right (particularly hiding the seam between the two hemispheres), but we had good results - even with "incorrect" filtering. We actually used VSM on our dual-paraboloid shadow maps in MUA2 - theoretically that makes no sense - your blur kernel is being severely warped and grown by the projection. In practice -- it looked pretty good.
Edit: On the other hand, if you're not planning to support lots of lights, and you're already restricting yourself to DX11, single-pass cubemaps are pretty compelling.
Edit: On the other hand, if you're not planning to support lots of lights, and you're already restricting yourself to DX11, single-pass cubemaps are pretty compelling.
Edited by osmanb, Today, 07:31 AM.


















