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

Creating shadows with shadow mapping

In this recipe, we will bring more realism to scenes with shadows using a simple and widely accepted shadowing technique called shadow mapping to produce real-time shadows. This technique is called shadow mapping because it uses the depth information of the scene stored or mapped to a dynamically created depth buffer to produce real-time shadows.

This technique works in two passes:

  • First pass: During the first pass, a scene is rendered from the perspective of light. Here, the scene is viewed from the position of light in the 3D space. In this way, it's clear to figure out what objects fall under the path of light. In other words, it provides the information of objects that are directly visible from the perspective ...

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