Texture Argument Flags
Each texture stage for a device can have two texture arguments that affect the color or alpha channel of the texture. You set and retrieve texture arguments by calling the IDirect3DDevice3::SetTextureStageState and IDirect3DDevice3::GetTextureStageState, specifying the D3DTSS_COLORARG1, D3DTSS_COLORARG2, D3DTSS_ALPHAARG1 or D3DTSS_ALPHAARG2 members of the D3DTEXTURESTAGESTATETYPE enumerated type.
The following flags, organized as arguments and modifiers, can be used with color and alpha arguments for a texture stage. You can combine an argument flag with a modifier, but you cannot combine two argument flags.
- Argument flags
- D3DTA_CURRENT
- The texture argument is the result of the previous blending stage. In the first texture stage (stage zero), this argument defaults to D3DTA_DIFFUSE.
- 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.
- D3DTA_SELECTMASK
- Mask value for all arguments; not used when setting texture arguments.
- D3DTA_TEXTURE
- The texture argument is the texture color for this texture stage. This is valid only for the first color and alpha arguments in a stage (the D3DTSS_COLORARG1 and D3DTSS_ALPHAARG1 members of D3DTEXTURESTAGESTATETYPE).
- D3DTA_TFACTOR
- The texture argument is the texture factor set in a previous call to the IDirect3DDevice3::SetRenderState with the D3DRENDERSTATE_TEXTUREFACTOR render state value.
- Modifier flags
- D3DTA_ALPHAREPLICATE
- Replicate the alpha information to all color channels before the operation completes.
- D3DTA_COMPLEMENT
- Invert the argument such that, if the result of the argument were referred to by the variable x, the value would be 1.0 - x.