added pattern support to shadows