Introduction to Virtual Shadow Mapping

Shadow Map

A shadow map is a technique used to compute the shadows of a scene, which is important for creating a realistic and immersive environment. In computer graphics, a shadow map is a 2D texture that stores depth information from the point of view of a light source. This depth information is then used to determine which parts of a scene are in shadow and which are not.

Virtual Shadow Map

The virtual shadow map is a technique to significantly increase shadow resolution, provide plausible soft shadows with reasonable performance costs, and replace the many stationary light shadowing techniques with a single, unified path. It does this by using a virtual texture of a large size, while only loading the necessary information into physical pages.

Problems

For the Virtual Shadow Map technique, there are several additional questions based on the Shadow Map:

  • How to determine whether a certain Page in the screen needs to be rendered?
  • How to allocate the physical Page position corresponding to a certain area in the screen?
  • How to determine the resolution of a Page corresponding to a region?

Please note that in the upcoming analysis, I will describe the steps in the order of execution by the engine, rather than the order of answering these questions, as the answers to these questions are distributed across various steps of VSM execution.

If you would like to familiarize yourself with various features of VSM first, such as when a Page is repainted, I highly recommend watching this video from Unreal Fest 2023: