A Geometry-Based
Soft Shadow Volume Algorithm Using Graphics
Hardware
A Geometry-Based
Soft Shadow Volume Algorithm Using Graphics
Hardware
Ulf Assarsson Ulf Assarsson
andand
Tomas Akenine
Tomas Akenine--MMööllerller
SIGGRAPH 2003 SIGGRAPH 2003
We present: We We present: present:
A Soft Shadow Volume Algorithm:
• Area light sources
• Simple volumetric light sources
• Textures and short video textures as lights
• Real-time performance with programmable graphics hardware
• Approximate soft shadows
– Trade speed vs accuracy
A Soft Shadow Volume Algorithm:
• Area light sources
• Simple volumetric light sources
• Textures and short video textures as lights
• Real-time performance with programmable graphics hardware
• Approximate soft shadows
– Trade speed vs accuracy
Intro demo
Intro demo
A short recap… A A short recap short recap … …
Area/volumetric lights give soft shadows
• Real lights have area or volume
• Thus, soft shadows more realistic
Area/volumetric lights give soft shadows
• Real lights have area or volume
• Thus, soft shadows more realistic
SOFT HARD
Overview Overview
Computation of visibility mask:
Computation of visibility mask:
•• 1st pass: Render hard shadow1st pass: Render hard shadow
•• 2nd pass: compensate for overstated umbra2nd pass: compensate for overstated umbra
Hard vs. soft shadows Hard vs. soft shadows
point source
umbra
area source
umbra penumbra
Two different light source types:
Two different light source types:
A Real-Time Soft Shadow Volume Algorithm
A Real-Time Soft Shadow
Volume Algorithm
Wedges Wedges Wedges
• Each silhouette edge has a corresponding wedge
– Provides a piece of penumbra contribution
– Rasterized by pixelshader
• Each silhouette edge has a corresponding wedge
– Provides a piece of penumbra contribution
– Rasterized by pixelshader
Two-pass algorithm
Two-pass algorithm
Visibility computation Visibility computation
• Really want to compute how much we can see of the light source
Visibility computation
Visibility computation
Precomputed contribution in 4D textures
Precomputed contribution in 4D textures
contribution
contribution areaarea
3232
3232
How the visibility
computation works:
How the visibility
computation works:
Rasterize a wedge
Rasterize a wedge
A A wedge wedge for for each silhouette edgeeach silhouette edge……
A A wedge wedge for for each silhouette edgeeach silhouette edge……
A A wedge wedge for for each silhouette edgeeach silhouette edge……
A A wedge wedge for for each silhouette edgeeach silhouette edge……
A A wedge wedge for for each silhouette edgeeach silhouette edge……
Rasterizing
Rasterizing the the wedgeswedges
Rasterizing
Rasterizing the the wedgeswedges
Rasterizing
Rasterizing the the wedgeswedges
Rasterizing
Rasterizing the the wedgeswedges
Rasterizing
Rasterizing the the wedgeswedges
Examples using textured lights Examples using textured lights
Texture
Texture of 16 area of 16 area lightslights Texture Texture of of two colorstwo colors
Fire Demo Fire
Fire Demo Demo
Fire Demo Fire
Fire Demo Demo
Comparisons Comparisons Comparisons
Reference
Reference image image Our algorithmOur algorithm
Comparisons Comparisons Comparisons
Reference
Reference image image Our algorithmOur algorithm
Comparisons Comparisons Comparisons
Small Small
light light source source
Large Large
light light source source
Comparisons Comparisons Comparisons
512 512 point lights Our algorithmpoint lights Our algorithm