Until now, we drew images as rigid rectangles of arbitrary shapes. But there is a possibility to draw an image as if it were made from rubber. To achieve this effect, the image is decomposed into a mesh consisting of a number of triangles or quadrangles (quads). Each triangle or quad is rendered with an arbitrary position on its vertices while preserving adjacency relation in the mesh. This gives a rubbery effect to the image.
Another way to geometrically achieve image distortion is direct pixel modification of the image, which was discussed earlier. But for big images, such methods often work too slowly.
A faster way to draw images with arbitrary modification is using shaders (see the Creating video effects with fragment shaders section in Chapter 8, Using Shaders).