Real-time shadow generation for 3D environments