Platform SDK: DirectX

D3DTEXTURESTAGESTATETYPE

The D3DTEXTURESTAGESTATETYPE enumerated type defines texture stage states. Members of this enumerated type are used with the IDirect3DDevice7::GetTextureStageState and IDirect3DDevice7::SetTextureStageState methods to retrieve and set texture state values.

typedef enum _D3DTEXTURESTAGESTATETYPE { 
    D3DTSS_COLOROP        = 1,  
    D3DTSS_COLORARG1      = 2,  
    D3DTSS_COLORARG2      = 3,  
    D3DTSS_ALPHAOP        = 4,  
    D3DTSS_ALPHAARG1      = 5,  
    D3DTSS_ALPHAARG2      = 6,  
    D3DTSS_BUMPENVMAT00   = 7,  
    D3DTSS_BUMPENVMAT01   = 8,  
    D3DTSS_BUMPENVMAT10   = 9,  
    D3DTSS_BUMPENVMAT11   = 10, 
    D3DTSS_TEXCOORDINDEX  = 11, 
    D3DTSS_ADDRESS        = 12, 
    D3DTSS_ADDRESSU       = 13, 
    D3DTSS_ADDRESSV       = 14, 
    D3DTSS_BORDERCOLOR    = 15, 
    D3DTSS_MAGFILTER      = 16, 
    D3DTSS_MINFILTER      = 17, 
    D3DTSS_MIPFILTER      = 18, 
    D3DTSS_MIPMAPLODBIAS  = 19, 
    D3DTSS_MAXMIPLEVEL    = 20, 
    D3DTSS_MAXANISOTROPY  = 21, 
    D3DTSS_BUMPENVLSCALE  = 22, 
    D3DTSS_BUMPENVLOFFSET = 23, 
    D3DTSS_TEXTURETRANSFORMFLAGS = 24,
    D3DTSS_FORCE_DWORD   = 0x7fffffff,
} D3DTEXTURESTAGESTATETYPE; 
D3DTSS_COLOROP
The texture-stage state is a texture color blending operation identified by one of the members of the D3DTEXTUREOP enumerated type. The default value for the first texture stage (stage 0) is D3DTOP_MODULATE, and for all other stages the default is D3DTOP_DISABLE.
D3DTSS_COLORARG1
The texture-stage state is the first color argument for the stage, identified by a texture argument flag. The default argument is D3DTA_TEXTURE.
D3DTSS_COLORARG2
The texture-stage state is the second color argument for the stage, identified by a texture argument flag. The default argument is D3DTA_CURRENT.
D3DTSS_ALPHAOP
The texture-stage state is a texture alpha blending operation identified by one of the members of the D3DTEXTUREOP enumerated type. The default value for the first texture stage (stage 0) is D3DTOP_SELECTARG1, and for all other stages the default is D3DTOP_DISABLE.

For DirectX 6.0, the default behavior for this state is not described as a texture operation. Rather, the alpha blending behavior matches that of the D3DRENDERSTATE_TEXTUREMAPBLEND render state with a value of D3DTBLEND_MODULATE.

D3DTSS_ALPHAARG1
The texture-stage state is the first alpha argument for the stage, identified by a texture argument flag. The default argument is D3DTA_TEXTURE. If no texture is set for this stage, the default argument is D3DTA_DIFFUSE.
D3DTSS_ALPHAARG2
The texture-stage state is the second alpha argument for the stage, identified by a texture argument flag. The default argument is D3DTA_CURRENT.
D3DTSS_BUMPENVMAT00
The texture-stage state is a D3DVALUE for the [0][0] coefficient in a bump-mapping matrix. The default value is 0.
D3DTSS_BUMPENVMAT01
The texture-stage state is a D3DVALUE for the [0][1] coefficient in a bump-mapping matrix. The default value is 0.
D3DTSS_BUMPENVMAT10
The texture-stage state is a D3DVALUE for the [1][0] coefficient in a bump-mapping matrix. The default value is 0.
D3DTSS_BUMPENVMAT11
The texture-stage state is a D3DVALUE for the [1][1] coefficient in a bump-mapping matrix. The default value is 0.
D3DTSS_TEXCOORDINDEX
Index of the texture coordinate set to use with this texture stage. The default index is 0. Set this state to the zero-based index of the coordinate set for each vertex that this texture stage uses. (You can specify up to eight sets of texture coordinates per vertex.) If a vertex does not include a set of texture coordinates at the specified index, the system defaults to the u and v coordinates (0,0).

Additionally, applications can include (as logical Or with the index being set) one of the following flags to request that Direct3D automatically generate the input texture coordinates for a texture transformation. With the exception of D3DTSS_TCI_PASSTHRU, which resolves to zero, if any of the following values is included with the index being set, the system uses the index strictly to determine texture wrapping mode. These flags are most useful when performing environment mapping.

D3DTSS_TCI_PASSTHRU
Use the specified texture coordinates contained within the vertex format. This value resolves to zero.
D3DTSS_TCI_CAMERASPACENORMAL
Use the vertex normal, transformed to camera space, as the input texture coordinates for this stage's texture transformation.
D3DTSS_TCI_CAMERASPACEPOSITION
Use the vertex position, transformed to camera space, as the input texture coordinates for this stage's texture transformation.
D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR
Use the reflection vector, transformed to camera space, as the input texture coordinate for this stage's texture transformation. The reflection vector is computed from the input vertex position and normal vector.
D3DTSS_ADDRESS
Member of the D3DTEXTUREADDRESS enumerated type. Selects the texture-addressing method for both the u and v coordinates. The default is D3DTADDRESS_WRAP.
D3DTSS_ADDRESSU
Member of the D3DTEXTUREADDRESS enumerated type. Selects the texture-addressing method for the u coordinate. The default is D3DTADDRESS_WRAP.
D3DTSS_ADDRESSV
Member of the D3DTEXTUREADDRESS enumerated type. Selects the texture-addressing method for the v coordinate. The default value is D3DTADDRESS_WRAP.
D3DTSS_BORDERCOLOR
D3DCOLOR value that describes the color to be used for rasterizing texture coordinates outside the [0.0,1.0] range. The default color is 0x00000000.
D3DTSS_MAGFILTER
Member of the D3DTEXTUREMAGFILTER enumerated type that indicates the texture magnification filter to be used when rendering the texture onto primitives. The default value is D3DTFG_POINT.
D3DTSS_MINFILTER
Member of the D3DTEXTUREMINFILTER enumerated type that indicates the texture minification filter to be used when rendering the texture onto primitives. The default value is D3DTFN_POINT.
D3DTSS_MIPFILTER
Member of the D3DTEXTUREMIPFILTER enumerated type that indicates the texture magnification filter to be used when rendering the texture onto primitives. The default value is D3DTFP_NONE.
D3DTSS_MIPMAPLODBIAS
Level of detail bias for mipmaps. Can be used to make textures appear more chunky or more blurred. The default value is 0. Values for this state are floating-point values. Because the IDirect3DDevice7::SetTextureStageState and IDirect3DDevice7::GetTextureStageState accept DWORD values, your application must cast a variable that contains the value, as shown in the following code example.
lpd3dDevice->SetTextureStageState( D3DTSS_MIPMAPLODBIAS, *((LPDWORD) (&fBias)) );
D3DTSS_MAXMIPLEVEL
Maximum mipmap level of detail that the application allows, expressed as an index from the top of the mipmap chain. (Lower values identify higher levels of detail within the mipmap chain). Zero, which is the default, indicates that all levels can be used. Nonzero values indicate that the application does not want to display mipmaps that have a higher level of detail than the mipmap at the specified index.
D3DTSS_MAXANISOTROPY
Maximum level of anisotropy. The default value is 1.
D3DTSS_BUMPENVLSCALE
D3DVALUE scale for bump-map luminance. The default value is 0.
D3DTSS_BUMPENVLOFFSET
D3DVALUE offset for bump-map luminance. The default value is 0.
D3DTSS_TEXTURETRANSFORMFLAGS
Member of the D3DTEXTURETRANSFORMFLAGS enumeration that controls the transformation of texture coordinates for this texture stage. The default value is D3DTTFF_DISABLE.
D3DTSS_FORCE_DWORD
Forces this enumeration to compile to 32 bits in size. This value is not used.

Remarks

The valid range of values for the D3DTSS_BUMPENVMAT00, D3DTSS_BUMPENVMAT01, D3DTSS_BUMPENVMAT10, and D3DTSS_BUMPENVMAT11 bump-mapping matrix coefficients is greater than or equal to –8.0, and less than 8.0. This range, expressed in mathematical notation is [–8.0,8.0).

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Version: Requires DirectX 6.0 or later.
  Header: Declared in d3dtypes.h.