Tilt-shift photography refers to a technique used to achieve a very shallow depth of field in a photograph. Tilting the lens changes the plane of focus, while shifting controls perspective.
In this Demonstration, the tilt-shift effect is simulated by combining image blurring and a gradient distance field. The "digital" tilt-shift creates focused areas and gradually defocuses the rest of the image.
By using this technique together with clever shot angles and some image adjustments, an image can be modified so that it looks like a photograph of miniature models. This process is sometimes called "miniature faking".
The size of the transition area around the mask is controlled by "threshold". The larger its value, the smoother the transition between focused and blurred areas will be.