An objective of the present invention is to provide a game system, program
and image generating method which can generate a more realistic image
with reduced processing load by using an alpha value set depending on a
depth value. Z-value for each pixel in an original image is transformed
into Z2-value that is formed of bits I to J which are positioned lower
than the most significant bit in the Z-value. The alpha value for each
pixel is set at a value corresponding to the Z2-value. Representation of
the depth of field or fog image is enabled by using the alpha value to
generate an image. The Z2-value is clamped to a given value depending on
a bit value other than the bits I to J of the Z-value. Bits M to N and K
to L (where K.gtoreq.I.gtoreq.L>M.gtoreq.J.gtoreq.N) in the Z-value
are set as index numbers in LUT1 and LUT2 and used to perform texture
mapping for transforming the Z-value into Z3- and Z4-values. These Z3-
and Z4-values are used to determine the Z2-value.