1. A computer-readable storage medium having stored thereon an image processing program to be executed by a computer of an image processing apparatus for generating an image, the image processing program causing the computer to execute: an α value setting step of setting an α value of each pixel of a reference image having a depth value for each pixel, the α value being set in accordance with the depth value of the respective pixel; an increasing step of increasing the α value which is set for a pixel having a smaller α value among two adjacent pixels; and a synthesis step of synthesizing the reference image and a blurred image corresponding to the reference image based on the α value which is set for each pixel after being processed by the increasing step.