http://quad-engine.com/public/Light.zip
This is small test (can work incorrect, so be kind) of shadow casting that i mentioned above.