ahillss / webgl2-stencil-shadow-volumes

GPU based stencil shadow volumes without geometry shaders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebGL Stencil Shadow Volumes

Demo (requires WebGL2).

Original idea was from Mikola Lysneko, and was implemented using the general algorithm described in GPU Gems 3, chapter 11.

Features

  • point light
  • runs on the gpu instead of cpu
  • can do zpass/zfail, back/front faced shadows
  • works on meshes with holes

Controls

  • w/d to move forward/backward
  • a/d to strafe
  • q/e to move up/down
  • hold left mouse down to look around, also hold down ctrl while doing this to spin the model

TODO

  • add directional light

About

GPU based stencil shadow volumes without geometry shaders


Languages

Language:JavaScript 97.5%Language:GLSL 1.2%Language:HTML 0.9%Language:CSS 0.4%