Some shadowmapping stuff I did to get into DX9/Cg/Shaders. It extends
standard shadowmapping by modifying the depth values of pixels in a
pixel shader. This enables one to create rather complex looking objects
casting complex shadows, which are based on very simple geometry. The
image and demo show a simple, textured sphere. The shadow is casted on
the floor geometry as well as the inner parts of the sphere-fragments.
Tested it only on my NV30, so I cannot guarantee it is running on other
You can get the demo here:
The demo includes the cg-shader sources.