Share via


Texture Argument Flags

Each texture stage for a device can have two texture arguments that affect the color or alpha channel of the texture.

Set and retrieve texture arguments by calling the IDirect3DDevice8::SetTextureStageState and IDirect3DDevice8::GetTextureStageState methods, and specifying the D3DTSS_COLORARG0, D3DTSS_COLORARG1, D3DTSS_COLORARG2, D3DTSS_ALPHAARG0, D3DTSS_ALPHAARG1, D3DTSS_ALPHAARG2, or D3DTSS_RESULTARG member of the D3DTEXTURESTAGESTATETYPE enumerated type.

The following tables show flags, organized as arguments and modifiers, that can be used with color and alpha arguments for a texture stage. You can combine an argument flag with a modifier, but two argument flags cannot be combined.

Argument flags

Flag Description
D3DTA_CURRENT The texture argument is the result of the previous blending stage. In the first texture stage (stage 0), this argument is equivalent to D3DTA_DIFFUSE. Permissions are read/write.
D3DTA_DIFFUSE The texture argument is the diffuse color interpolated from vertex components during Gouraud shading. If the vertex does not contain a diffuse color, the default color is 0xFFFFFFFF. Permissions are read-only.
D3DTA_SELECTMASK Mask value for all arguments; not used when setting texture arguments.
D3DTA_SPECULAR The texture argument is the specular color interpolated from vertex components during Gouraud shading. If the vertex does not contain a specular color, the default color is 0xFFFFFFFF. Permissions are read only.
D3DTA_TEMP The texture argument is a temporary register color for read or write. D3DTA_TEMP is supported if the D3DPMISCCAPS_TSSARGTEMP device capability is present. The default value for the register is (0.0, 0.0, 0.0, 0.0). Permissions are read/write.
D3DTA_TEXTURE The texture argument is the texture color for this texture stage. Permissions are read-only.
D3DTA_TFACTOR The texture argument is the texture factor set in a previous call to the IDirect3DDevice8::SetRenderState with the D3DRS_TEXTUREFACTOR render-state value. Permissions are read-only.

Modifier flags

Flag Description
D3DTA_ALPHAREPLICATE Replicate the alpha information to all color channels before the operation completes. This is a read modifier.
D3DTA_COMPLEMENT Invert the argument so that, if the result of the argument were referred to by the variable x, the value would be 1.0 minus x. This is a read modifier.

See Also

Direct3D Macros | D3DTEXTURESTAGESTATETYPE | IDirect3DDevice8::SetRenderState | IDirect3DDevice8::GetTextureStageState | IDirect3DDevice8::SetTextureStageState

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.