HardwareShadow Mapping Algorithm
Two pass approach
- First, render scene from light’s point-of-view with depth testing
- Copy the depth buffer to a “depth texture”
- Second, render scene from eye’s point-of-view as follows
- Configure eye-linear texgen to generate (s,t,r,q) coordinates in light’s coordinate space (“r” is z-planar distance to the light)
- Configure special shadow texture filter operator
- Texture filter tests if “r” is less than depth texture texel
- Texture color is one if tests passes, zero if test fails
- Modulate fragment color with one or zero texture