Use transform/warp for each layer, basically. Here's a quickly done example:
Whoa, neat! Which tool does that? That's really well done.
No special tool is used, just free transform and other transform variants (perspective/distort/skew/etc). This is done manually.