Improved shadow casting