Percentage Closer Filtering Shadows
Percentage Closer Filtering (PCF) shadows are a variation of shadow maps that involves blurring the samples. PCF is more than just a screen space blur, as the blur respects how far the object is from the viewer, and furthermore PCF can be extended to support more realistic variable umbrae and penumbrae. The basic idea is that when sampling the shadow map, instead of just sampling at one position, many samples can be taken around the same spot and an average can be determined.
Because these extra samples are often taken in a predictable way, noticeable artifacts may arise due to the uniformity. One technique used to mitigate this is to randomize samples taken so that the human eye won’t notice. This is the technique we used in Bear Pile, and it’s used in other popular games like Crysis.
In the below video I show off my implementation of shadow mapping and PCF. It’s hard to tell that I’m adjusting the PCF filter because the video is so compressed and grainy, but while I’m running the demo I change the shadows dynamically from hard to soft shadows.