Shadow Mapping

tutorial

inspiration of shadow map is to render from camera perspective to framebuffer. framebuffer is same for render on screen as example-3 show which contain zyx + w. we just reuse w from framebuffer to check is pixel (in fragment shader) should be light or shadow.

code: https://github.com/krist7599555/webgl-realtimecg-project/tree/master/src/example-5.svelte