Mesh objects with UV 'texture face' co-ordinates can be saved in a render pass, and used in the Compositor as input to remap textures.
Unfortunately UV values can't be simply filtered or antialiased as for colors. It is also important to retrieve from the UV image information to correctly and map a new image without aliasing. In Blender that's solved as follows:




Dilate/erode grows and shrinks masks by comparing pixels to their surroundings and taking the maximum or minimum values. This can be very useful for cleaning up a key after a matte node. Negative values shrink the mask and positive values grow.
The displace node displaces an image's pixels based on an input vector mask. This can be useful for a lot of things, like hot air distortion, quick-and-dirty composited refraction, compositing live footage behind refracting objects, and more!


The amount of displacement for each pixel in the X and Y directions is determined by:
You can use the displace node in two ways, with a greyscale mask (easy to paint or take from a procedural texture), or with a vector channel or RGB image, such as a normal pass, which will displace the pixels based on the normal direction.

This node will convert a number from an Object Index pass to an anti-aliased alpha mask. (Set Object pass indices in Object buttons, the "Object and Links" panel.)
Since indices cannot be filtered or anti-aliased, a post-process function is used which fills in the jaggies with interpolated values. Here it uses the same function as used for creating masks for Vector Blur.