Shadow Mapping Resources
Contents
Someone recently asked in TheCherno’s Discord server if there were any good resources for shadow mapping. I’ve been researching shadows quite a bit over the last few months, and have a sizable list of bookmarks. I’ve compiled some of the more useful ones on this page. Many of these links go to sub-pages of larger tutorials, all of which are fantastic, so don’t be afraid to explore beyond the landing pages I’ve linked below.
Best of luck!
Light Maps
opengl-tutorial - Lightmaps
A quick introduction to generating static light maps using Blender.
Real-Time Shadow Mapping
Learn OpenGL - Shadow Mapping
An introduction to shadow mapping in the context of OpenGL. Explains various improvements such as preventing acne (Moiré patterns) using a bias, preventing Peter Panning using front-face culling and preventing over sampling (double shadows) by adding various additional checks. Also goes over percentage-closer filtering (PCF) for softening shadows.
Learn OpenGL - Point Shadows
An introduction to point light shadows (via cubemaps) in the context of OpenGL.
opengl-tutorial - Shadow Mapping
Similar to the other tutorials (acne, Peter Panning, PCF) but with additional tips: Poisson sampling, automatic frustrum, “early bailing” (early out optimization for per-fragment filters with high sample counts).
Rendering to a cubemap
Some helpful tips regarding rendering to cubemaps in OpenGL.
Refinements
Fabian Sanglard - SHADOWMAPPING WITH GLSL
Fix self-shadowing, acne (Moiré patterns), over sampling (double shadows).
Fabian Sanglard - SOFT SHADOWS WITH PCF
Introduces “Percentage close filtering” (PCM), a technique for softening shadows.
Fabian Sanglard - SOFTSHADOW WITH GLUT,GLSL AND VSM
Introduces “Variance shadow mapping” (VSM), an alternative to PCM for softening shadows.
dontnormalize - Variance Shadow Maps
Another author’s take on VSM.
Advanced Techniques
OGLdev - Cascaded Shadow Mapping Introduces “Cascaded Shadow Mapping” (CSM), a technique for increasing the resolution of shadow maps by dividing the view frustrum into chunks and using a separate shadow map for each chunk (divide-and-conquer).