Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

Texture stages operate by taking either two or three color inputs an then performing a blending operation on those inputs. The output from the stage is the resulting color value. In parallel, the texture stage also takes either two or three alpha inputs, and performs a blending operation on them to form alpha component of the output color value.

The driver limits any result values from a texture operation that causes an overflow.

Specifying Stage Inputs

The following list shows the values from the D3DMTEXTURESTAGESTATETYPEenumerations that you can use to specify the color inputs into a texture stage.

  • D3DMTSS_COLORARG1 and D3DMTSS_COLORARG2

  • D3DMTSS_COLORARG0

  • D3DMTSS_ALPHAARG1 and D3DMTSS_ALPHAARG2

  • D3DMTSS_ALPHAARG0

Each of these texture stage states accept a combination of D3DMTA Valuesthat specify which color value to use for that input. The following list shows the flags you can use to specify color values for an input. These flags are all mutually exclusive.

  • D3DMTA_DIFFUSE

  • D3DMTA_CURRENT

  • D3DMTA_TEXTURE

  • D3DMTA_TFACTOR

  • D3DMTA_SPECULAR

  • D3DMTA_TEMP

You can also use the D3DMTA_COMPLEMENT and D3DMTA_ALPHAREPLICATE flags to identify preprocessing options. These options only affect the input to the texture stage, not the original color value that is used as the input.

Specifying Stage Output

You can specify the output of the texture stage via the D3DMTSS_RESULTARG texture stage state (see D3DMTEXTURESTAGESTATETYPE). The valid values for this state are D3DMTA_CURRENT, which is the default value, and D3DMTA_TEMP.

Specifying Stage Operation

You can use the D3DMTSS_ALPHAOP and D3DMTSS_COLOROP stage states to specify the blending operations. These texture stage states both accept values from the D3DMTEXTUREOPenumeration. Passing a value that is not in this enumeration results in a D3DMERR_DRIVERINVALIDCALL blend error.

You can disable a texture stage by setting the D3DMTSS_COLOROP state to the value D3DMTOP_DISABLE. A disabled texture stage signals the end of the texture cascade to Direct3D Mobile and that the current value is the texture output value.

See Also

Concepts

Texture Mapping