×
Menu

Texture and Vertex Color Apply Modes (EN)

 

 Выдержка из оригинальной справки. (NDL Gamebryo 1.1)
 
The final step in texturing is to merge the selected texture color and the vertex colors, if any. The inputs to this process are the selected texture color and alpha for the pixel, the interpolated vertex color and vertex alpha, and the texture apply mode. Notice that we have not mentioned how the vertex colors are computed. This is entirely independent of texturing and is set using NiVertexColorProperty. The texture apply modes, their actions and usage are listed in the table below. Note that for the following table, CR represents the final color, AR represents the final alpha, CT represents the texture color, AT represents the texture alpha, CV represents the vertex color, and AV represents the vertex alpha. Note also that, unless otherwise stated, if a texture has no alpha channel, the alpha channel is assumed to be 1.0 (fully opaque):
Apply Mode
Resulting Color
Alpha
Common Application
APPLY_REPLACE
CR = CT
AR = AT
Basic texturing without any dynamic or static vertex-based lighting
APPLY_DECAL
CR = CT * AT + CV * (1-AT)
AR = AV
Decal or bullet-hole textures on a base untextured surface
APPLY_MODULATE
CR = CT * CV
AR = AT * AV
Texture and final vertex colors and alpha values are multiplied component-by-component.
APPLY_HILIGHT
Platform specific
Platform specific
This mode is a PS2-only mode that maps directly to the PS2 hardware mode of the same name.
APPLY_HILIGHT2
Platform specific
Platform specific
This mode is a PS2-only mode that maps directly to the PS2 hardware mode of the same name.
The texture apply mode is set using the NiTexturingProperty ApplyMode function. Since texture and vertex blending happens after all texturing (see the section below describing the Gamebryo multitexture pipeline for discussion of multitextured texture application), this value is not set independently for each Map, but rather once for each NiTexturingProperty property as a whole. Not all renderers support all texture apply modes, nor do all renderers support the same set of modes across all sets of rendering states. See the specific renderer documentation below for details.
 
Texture Apply Modes Supported
The NiDX8Renderer does not support the APPLY_DECAL, APPLY_HILIGHT, and APPLY_HILIGHT2 texture-apply modes.
Most DX8 hardware cards can support APPLY_REPLACE and APPLY_MODULATE.