1. A non-transitory 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 configured to cause the computer to: set an α value of each pixel of a reference image having a depth value, the α value being set in accordance with the depth value of the respective pixel; increase the α value for a pixel having a smaller α value among two adjacent pixels each having a depth value equal to or smaller than a reference value, the reference value being based on a focal length of a virtual camera; assign the α value of the pixel to a first parameter value when the depth value of the pixel is smaller than the reference value; assign the α value of the pixel to a second parameter value when the depth value of the pixel is larger than the reference value; determine the α value of the pixel based on the first parameter value and the second parameter value; and synthesize the reference image and a blurred image corresponding to the reference image based on the α value after determining the α value of the pixel based on the first parameter value and the second parameter value.