A shadow mapping utility class that handles the creation and management of shadow maps using moment-based shadow mapping techniques. This class provides functionality to generate shadow moment data by rendering scene entities from a light source perspective and storing the depth information in a specialized framebuffer for later shadow calculations.

The shadow map uses RG16F texture format to store depth moments, which allows for better shadow quality and soft shadow effects compared to traditional shadow mapping.

Constructors

  • Creates a new ShadowMap instance with initialized framebuffer and material for shadow mapping. Sets up a 1024x1024 framebuffer with RG16F texture format for storing shadow moments and creates a depth moment encode material for rendering shadows.

    Returns ShadowMap

Methods

  • Returns the framebuffer containing the rendered shadow moment data. This framebuffer stores the depth moments in RG16F format and can be used for shadow calculations in subsequent rendering passes.

    Returns FrameBuffer

    The shadow moment framebuffer containing depth moment texture data