Shadow maps and projected textures

Both look at the scene from the light. A shadow map renders it from the light into a framebuffer, keeping depth; a fragment is in shadow if something nearer to the light was stored where it falls. A projected texture maps a slide through the light's projection instead. This page combines shadowMap and projectiveTexture, and can draw the left and right halves with one setting changed.

Oops ... your browser doesn't support the HTML5 canvas element
Drag to orbit (when the camera is not the sample's) · inset: the shadow map, seen from the light

Example and comparison
Shadow map
Scene and projector
Camera and light

What the samples do, and what this page changes