Improve shadow generation by allowing custom settings