shadow: add shadow caching for paint
shadow: do not use translation when generate pattern hash