global affine transform by Reinhard et al.