Summed-Area Variance Shadow Maps - PowerPoint PPT Presentation

About This Presentation
Title:

Summed-Area Variance Shadow Maps

Description:

Replace the filtering step with summed-area variance shadow maps (SAVSM) ... Variance shadow maps allow efficient filtering and solve many problems with ... – PowerPoint PPT presentation

Number of Views:87
Avg rating:3.0/5.0
Slides: 25
Provided by: gregl57
Category:
Tags: area | maps | shadow | summed | variance

less

Transcript and Presenter's Notes

Title: Summed-Area Variance Shadow Maps


1
Summed-Area Variance Shadow Maps
  • Andrew Lauritzen
  • University of Waterloo

2
Overview of Shadow Mapping
  • Introduced by Williams in 1978
  • Image space algorithm
  • Advantages compared to shadow volumes
  • Cost less sensitive to geometric complexity
  • Works with anything that can be rasterized
  • Can be queried at arbitrary locations
  • Often easier to implement

3
Shadow Mapping Algorithm
  • Render scene from the lights point of view
  • Store depth of each pixel
  • When shading a surface
  • Transform the surface point into lights
    coordinate system
  • Compare current surface depth against depth
    stored in shadow map (nearest occluder to light)
  • If surface depth gt shadow map lookup, the pixel
    is in shadow otherwise the pixel is lit

4
Magnification Artifacts
5
Minification Artifacts
6
Biasing Artifacts
7
Solutions
  • Magnification artifacts
  • Improve the projection (warping, etc.)
  • Parallel-split/cascaded shadow maps
  • Minification artifacts
  • Percentage closer filtering
  • Trilinear filtering with variance shadow maps
  • Biasing
  • Using back faces/midpoints
  • Biasing the depth
  • Variance shadow maps

8
Variance Shadow Maps (VSMs)
  • Store depth squared as well as depth
  • Do any linear filtering
  • Multisample anti-aliasing (while rendering shadow
    map)
  • Blurring the shadow map (to soften shadow edges)
  • Trilinear and anisotropic filtering
  • Single lookup into shadow map
  • Yields E(x) and E(x2) where x is the depth of the
    nearest occluder
  • Use Chebyshevs Inequality to compute the shadow
    attenuation

9
Problems Solved by VSMs
  • Efficient filtering!
  • Hardware filtering
  • Separable O(n) pre-filtering (blur)
  • Biasing
  • Large filter regions are automatically handled
    properly
  • Can account for the extents of a single shadow
    map texel using the second moment

10
Mipmapping Results
11
Anisotropic Filtering Results
12
Biasing Artifacts Resolved
13
Problems with VSMs
  • Light bleeding
  • Want arbitrary per-pixel filter regions for
    plausible soft shadows
  • Not possible with pre-filtering

14
Light Bleeding
15
Light Bleeding
16
Light Bleeding Reduction
  • Cannot be solved without taking more samples!
  • Can be reduced quite easily
  • Light bleeding regions never reach 100
    illumination
  • Cut off the tail of the function to eliminate
    light bleeding while over-darkening some
    penumbrae regions
  • Effectively free performance-wise
  • Artist editable aggressiveness parameter

17
Light Bleeding Reduction
18
Efficient Soft Edges
  • Build a summed-area table from the shadow map
  • Can be done efficiently on the GPU
  • Summing arbitrary rectangles is O(1)!

19
Percentage-Closer Soft Shadows
  • Fernando in 2005
  • Replace the filtering step with summed-area
    variance shadow maps (SAVSM)

20
Performance
21
Demo
22
Conclusion
  • Variance shadow maps allow efficient filtering
    and solve many problems with standard shadow maps
  • Together with summed-area tables, they allow
    efficient plausible soft shadows
  • Light bleeding reduction eliminates all but the
    most stubborn artifacts

23
Future Work
  • Adaptively scale up the number of samples taken
    to eliminate all light bleeding, even in complex
    regions
  • Non-trivial, but stay tuned
  • Combine with other (plausible) soft shadows
    algorithms?
  • Back-projection methods

24
Questions?
  • See GPU Gems 3 chapter for much more detail
  • atlaurit_at_cs.uwaterloo.ca
  • http//www.punkuser.net/vsm/
Write a Comment
User Comments (0)
About PowerShow.com