6.3.1 About dynamic soft shadows based on local cubemaps
In your scene there are moving objects and static environments such as rooms. By using this technique, you are not required to render static geometry to a shadow map every frame. This enables you to use a texture to represent the shadows.
Cubemaps can be a good approximation of many kinds of a static local
environment including irregular shapes such as the cave in the Ice Cave demo. The alpha
channel can also represent the amount of light entering the room.
The objects that move are typically everything except the room. Objects
- The sun.
- The camera.
- Dynamic objects.
With the whole room represented by a cube texture you can access
arbitrary texels of the environment within a fragment shader. For example, this means
the sun can be in any arbitrary position and you can calculate the amount of light
reaching a fragment based on the value fetched from the cubemap.
The alpha channel or transparency, represents the amount of light
entering the local environment. In your scene, attach the cubemap texture to the
fragment shaders that render the static and dynamic objects that you want to add shadows