Related mental ray shader: Distortion
In the real world, camera lenses are not perfect, and therefore introduce errors (aberrations) in the images they capture. One of the most noticeable errors, called distortion, causes the resulting image to be pulled in or pushed out, so that long straight lines become bowed.
The grid object (in the center) is displayed with a Pin Cushion distortion (on the left) and a Barrel distortion (on the right).
The Distortion shader applies a physically accurate camera lens distortion to an image. And because this is a lens shader, you can create a severe distortion without causing the stretching problem associated with similar post-rendering effects.
This shader can be applied directly to the camera in the lens shader stack. See Applying Lens Shaders to Cameras [Cameras and Motion Blur].