< Zurück | Inhalt | Weiter >

14.4.2 Mode

See figures 14.19–14.23 and table 14.4 for descriptions of the four modes in which a texture image can be applied to a surface:


Table 14.4 Texture modes


Mode

Effect

DECAL

Color value is the product of the surface color and 1 – alpha value for the surface plus texture color times


texture alpha. The texture is applied to the surface in proportion to the alpha components of both the texture and the surface. The texture must either be in RGB or RGBA format.


MODULATE

Color value is the product of the color values of the texture and the surface color. If MODULATE is used with dark textures the surface may end up black.


BLEND

The color values on the surface are modulated by the color values of the texture and biased by the blend color.

REPLACE

Color value is simply the texture color.


image

Figure 14.19 Material colors set and no texture image applied


image


Figure 14.20 Material colors set as in figure 14.14 and texture image applied using DECAL mode

image


Figure 14.21 Material colors set as in figure 14.14 and texture image applied using MODULATE mode


image


Figure 14.22 Material colors set as in figure 14.14 and texture image applied using BLEND mode

image


Figure 14.23 Material colors set as in figure 14.14 and texture image applied using REPLACE mode


Refer to the Java 3D API Specification for more details on the texture mapping equations.