The best way to do this is probably to use a flipped sprite, tinted black with 30% alpha or somethign like that. When its tinted black, it will lose all the color content, and as a result will look more or less like a shadow.
To get perspective, you will need to modify the code to offset the top of the sprite along the local Y axis (simulating a skew matrix). To get the shadow going up a wall, simply use the clipped sprite sample - split the shadow up into two parts, and skew them with different amounts to simulate varying levels of perspective.
The easiest way to go about this is to take the clipped sprite sample and modify it to add the skew component.