While using the reasterized layer indeed increases the performance you will get better (nicer) results using the shadowpath proerty as @wayne-hartman suggests.
Check http://nachbaur.com/blog/fun-shadow-effects-using-custom-calayer-shadowpaths on how to use the CALayer shadow path.