Use drawViewHierarchyInRect: instead of renderInContext: to use correct 3d transforms for sublayers.