Skip to content

Ghost4Man/ShadowMappingDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shadow Mapping Demo

This project's goal is to demonstrate and visualize the Cascaded Shadow Mapping algorithm for computing shadows in real-time 3D graphics.

screenshot of the app image

Build

  1. mkdir build
  2. cmake -B build && cmake --build build
  3. run with ./build/ShadowMappingDemo

Controls

Most of the controls are located in ImGui windows:

  • Rendering
    • various display modes that showcase some part of how the algorithm works, etc.
  • Camera
    • it's possible to switch between controlling the Main Camera, Spectator camera and Light using the Tab key
    • the displayed camera is independent and is controlled with number keys at the top of the keyboard (1, 2, 3)
    • options to visualize the cascades light and view (sub)frustums
  • Shadow mapping
    • configuration of the shadowmap size (resolution), depth bias, PCF, culling, cascade splits, etc.
    • contains a shadow map inspector that shows the depth map from a specific cascade and allows zooming in
  • Scene
    • supports loading scenes from .glb files
      • currently only supports flattened scenes (all nodes on the top level)

Right click in the scene to visualize shadow computation for the given pixel/fragment.

Other controls (mouse and keyboard) are described in the Controls window.

Dependencies

  • fmt
  • glad
  • glfw
  • glm
  • imgui
  • tiny_gltf
    • json
    • stb_image