Module dagon.graphics.csm

Provides boilerplate for cascaded shadow mapping (CSM).

Description

Cascaded shadow mapping is a technique for rendering high-quality shadows over large scenes by splitting the camera frustum into multiple regions (cascades), each with its own shadow map. This module defines the CascadedShadowMap class, which manage the projection, view, and shadow matrices for each cascade, as well as OpenGL resources for multi-layered shadow maps.

Functions

NameDescription
snapTo(a, resolution)

Classes

NameDescription
CascadedShadowMap Cascaded shadow map with three cascades.
ShadowArea Geometric representation a single shadow area (cascade) for CSM. Stores projection, view, and shadow matrices, as well as the position and size of the cascade. Used internally by CascadedShadowMap class to manage each shadow region.