/*
 * ENUM: SE_IMAGE_MAPPING_METHOD_ENUM
 *
 *   Specifies how to combine an <Image Mapping Function>'s texture map with
 *   any <Colors> on the textured object. There are 4 methods: Replace, Decal,
 *   Modulate, and Blend.
 *
 *   For most image signatures, only the Replace method is valid. The other 3
 *   image mapping methods are only defined for <Images> that have one of the
 *   following image signatures:
 *         SE_IMAGE_SIGNATURE_ALPHA
 *         SE_IMAGE_SIGNATURE_LUMINANCE
 *         SE_IMAGE_SIGNATURE_LUMINANCE_ALPHA
 *         SE_IMAGE_SIGNATURE_123COLOR
 *         SE_IMAGE_SIGNATURE_123COLOR_ALPHA
 *
 *   When applying <Images> to an object, there are up to 4 sets of values to
 *   consider:
 *   - the current <Color> and alpha (a.k.a. <Translucency>) of the object
 *
 *   - the <Color> and alpha defined by the <Image>
 *
 *   - the image blend color (if any) of the object; specified by one of its
 *     <Color> components, if present
 *
 *   - the final <Color> and alpha of the object
 *
 *   Based on what elements are defined in the image, here are the
 *   recommendations of the other 3 image mapping methods on how to
 *   combine the <Image>'s color and alpha with the object's pre-existing
 *   values to produce the final displayed values. These recommendations
 *   are based on the number of color and alpha elements defined in the
 *   applied <Image>:
 *
 *    Type 1 - Only one Color component (either a Luminance value or an
 *             Alpha value) is defined in each texel of the <Image>, whose
 *             image signature is either of type SE_IMAGE_SIGNATURE_LUMINANCE
 *             or SE_IMAGE_SIGNATURE_ALPHA.
 *
 *    Type 2 - Two Color components are defined (Luminance and Alpha) in each
 *             texel the <Image>, whose image signature is of type
 *             SE_IMAGE_SIGNATURE_LUMINANCE_ALPHA.
 *
 *    Type 3 - A full color triplet (but no Alpha) is defined in each texel of
 *             the <Image>, whose image signature is of type
 *             SE_IMAGE_SIGNATURE_123COLOR.
 *
 *    Type 4 - A full color triplet and alpha are defined in each texel of the
 *             <Image>, whose image signature is of type
 *             SE_IMAGE_SIGNATURE_123COLOR_ALPHA.
 *
 *   Please note that in the following equations, it is *assumed* that
 *   (a) values are normalized for all components, and
 *   (b) if an object does not have an explicitly defined alpha, the alpha for
 *       that object is 1.
 *
 *   Also, in the following equations, the calculation for Displayed Color is
 *   actually done once for each of the components of color model, using the
 *   respective color components.
 */
typedef enum
{
SE_REPLACE_IMAGE, (notes)
SE_DECAL_IMAGE, (notes)
SE_MODULATE_IMAGE, (notes)
SE_BLEND_IMAGE (notes)
} SE_IMAGE_MAPPING_METHOD_ENUM;


Enumerator Notes

SE_REPLACE_IMAGE

 For this image mapping method, no calculations are needed; the color and
 alpha (a.k.a. translucency) of the <Image> completely replace the
 original color and alpha of the object (if any).

SE_DECAL_IMAGE

 For this method, the <Image> is essentially rendered on top of anything
 already there, like a decal (hence the name).

      For Type 1 and Type 2, the results are not defined.

      For Type 3 - Displayed Color = Image Color

                   Displayed Alpha = Original Object Alpha

      For Type 4 - Displayed Color =
                   (1 - Image Alpha) * Original Object Color +
                   (Image Alpha  * Image Color)

                   Displayed Alpha = Original Object Alpha

SE_MODULATE_IMAGE

 For this method, the <Image>'s luminance (or color) and alpha are
 linearly combined with those of the original object.

      For Type 1 Luminance - Displayed Color = Image Luminance *
                                               Original Object Color

                             Displayed Alpha = Original Object Alpha

      For Type 1 Alpha - Displayed Color = Original Object Color

                         Displayed Alpha = Original Object Alpha *
                                           Image Alpha

      For Type 2 - Displayed Color = Image Luminance *
                                     Original Object Color

                   Displayed Alpha = Image Alpha * Original Object Alpha

      For Type 3 - Displayed Color = Image Color * Original Object Color

                   Displayed Alpha = Original Object Alpha

      For Type 4 - Displayed Color = Image Color * Original Object Color

                   Displayed Alpha = Image Alpha * Original Object Alpha

SE_BLEND_IMAGE

 For this method, the image blend color of the object determines how
 the <Image> is combined with the object's primary color.

      For Type 1 Luminance - Displayed Color =
                              (1 - Image Luminance) *
                                 Original Object Color +
                              (Image Luminance  * Blend Color)

                             Displayed Alpha = Original Object Alpha

      For Type 1 Alpha - Displayed Color = Original Object Color

                         Displayed Alpha = Original Object Alpha *
                                           Image Alpha

      For Type 2 - Displayed Color =
                      (1 - Image Luminance) * Original Object Color +
                      (Image Luminance  * Blend Color)

                   Displayed Alpha = Original Object Alpha * Image Alpha

      For Type 3 - Displayed Color =
                      (1 - Image Color) * Original Object Color +
                      (Blend Color * Image Color)

                   Displayed Alpha = Original Object Alpha

      For Type 4 -  Displayed Color =
                       (1 - Image Color) * Original Object Color +
                       (Blend Color * Image Color)

                    Displayed Alpha = Original Object Alpha * Image Alpha
Prev: SE_IMAGE_COMPONENT_ENUM. Next: SE_IMAGE_MIP_FIELDS. Up:Index