Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shadowmap Visualizer

An interactive WebGL2 demo for understanding how shadow mapping works. The screen is split into four viewports rendered every frame:

Viewport Contents
Top left The shadow map
Top right Shadow-map depth projected onto the scene
Bottom left Final lit scene with shadows
Bottom right Unlit scene

Hover the mouse over the shadow map to cast the corresponding light ray through the scene. it is drawn as a white line in the other viewports, and the depth value stored at that shadow-map texel is shown in the side panel.

Controls

  • Mouse over the top-left viewport — pick a shadow-map texel and visualize its light ray in world space.
  • Stop/Play rotation — toggle the orbiting camera.
  • Mesh — swap the floating model between cube, sphere, pyramid and cone.
  • Azimuth / elevation sliders — change the directional light.

Credits

  • gl-matrix (MIT) for vector/matrix math, vendored in lib/.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages