O'Reilly logo

OpenGL ES 3.0 Cookbook by Parminder Singh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using variance shadow mapping

In the previous recipe, we understood the implementation of PCF. It produces good quality soft shadows. The problem with PCF is that it requires more samples to produce better quality results. In addition, like standard textures, it's impossible to use prefiltered mipmapping to boost the process. Therefore, we must sample multiple texels to average out the resultant to compute the light attenuation on the current texel. The overall process to render the shadow can be slow.

Such drawbacks of PCF can be overcome by using variance shadow mapping. This technique relies on Chebyshev Probabilist Prediction, which makes use of mean and variation. The mean can be simply get from the shadow map texture and the (σ2) variance ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required