TextureStageStates Enumeration (Microsoft.DirectX.Direct3D)

Defines texture stage states.

Definition

Visual Basic Public Enum TextureStageStates
C# public enum TextureStageStates
C++ public enum class TextureStageStates
JScript public enum TextureStageStates

Members

Member Value Description
ResultArgument 28 Selects the destination register for the result of the current stage identified by TextureArgument.

This value can be set to TextureArgument.Current (the default value) or to TextureArgument.Temp, which is a single temporary register that can be read into subsequent stages as an input argument. The final color passed to the fog blender and frame buffer is taken from TextureArgument.Current, so the last active texture stage state must be set to TextureArgument.Current. This setting is supported if the MiscCaps.SupportsTextureStageStateArgumentTemp device capability is present.
AlphaArgument0 27 Defines settings for the alpha channel selector operand for triadic (multiply, add, and linear interpolation) operations identified by the TextureArgument enumeration.

AlphaArgument0 is supported if the TextureOperationCaps.SupportsMultiplyAdd or TextureOperationCaps.SupportsLerp device capabilities are present. The default argument is TextureArgument.Current.

To select a temporary register color for read or write, specify TextureArgument.Temp, which is supported if the MiscCaps.SupportsTextureStageStateArgumentTemp device capability is present. The default argument is (0.0, 0.0, 0.0, 0.0).
ColorArgument0 26 Defines settings for the third color operand for triadic (multiply, add, and linear interpolation) operations identified by the TextureArgument enumeration.

This setting is supported if the TextureOperationCaps.SupportsMultiplyAdd or TextureOperationCaps.SupportsLerp device capabilities are present. The default argument is TextureArgument.Current.

Specify TextureArgument.Temp to select a temporary register color for read or write. TextureArgument.Temp is supported if the MiscCaps.SupportsTextureStageStateArgumentTemp device capability is present. The default value for the register is (0.0, 0.0, 0.0, 0.0).
TextureTransform 24 Controls the transformation of texture coordinates for the current texture stage. The default value is TextureTransform.Disable.
BumpEnvironmentLuminanceOffset 23 Defines a floating-point offset value for bump-map luminance. The default value is 0.0.
BumpEnvironmentLuminanceScale 22 Defines a floating-point scale value for bump-map luminance. The default value is 0.0.
BumpEnvironmentMaterial11 10 Defines the texture-stage state as a floating-point value for the [1][1] coefficient in a bump-mapping matrix. The valid range of values for 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). The default value is 0.0.
BumpEnvironmentMaterial10 9 Defines the texture-stage state as a floating-point value for the [1][0] coefficient in a bump-mapping matrix. The valid range of values for 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). The default value is 0.0.
BumpEnvironmentMaterial01 8 Defines the texture-stage state as a floating-point value for the [0][1] coefficient in a bump-mapping matrix. The valid range of values for 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). The default value is 0.0.
BumpEnvironmentMaterial00 7 Defines the texture-stage state as a floating-point value for the [0][0] coefficient in a bump-mapping matrix. The valid range of values for 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). The default value is 0.0.
AlphaArgument2 6 Defines the texture-stage state as the second alpha argument for the stage identified by the TextureArgument enumeration.

The default argument is TextureArgument.Current. Specify TextureArgument.Temp to select a temporary register color for read or write. TextureArgument.Temp is supported if the MiscCaps.SupportsTextureStageStateArgumentTemp device capability is present. The default value for the register is (0.0, 0.0, 0.0, 0.0).
Constant 32 Defines the per-stage constant color. To determine whether the current device supports a per-stage constant color, use the MiscCaps.SupportsPerStageConstant property. The ConstantColor property is used by TextureArgument.Constant.
TextureCoordinateIndex 11 Defines the index of the texture coordinate set to use with the current texture stage.

Up to eight sets of texture coordinates per vertex can be specified. If a vertex does not include a set of texture coordinates at the specified index, the system reverts to the u and v coordinates (0, 0) by default.

When rendering with vertex shaders, each stage's texture coordinate index must be set to its default value. The default index for each stage is equal to the stage index. Set this state to the zero-based index of the coordinate set for each vertex that this texture stage uses.

Additionally, applications can include TextureCoordinateIndex values as part of a logical OR with the index being set, to request that Microsoft DirectX automatically generate the input texture coordinates for a texture transformation.

The system uses the index strictly to determine texture wrapping mode when using a TextureCoordinateIndex value other than PassThru, which resolves to zero. These flags are most useful when performing environment mapping.
AlphaArgument1 5 Defines the texture-stage state as the first alpha argument for the stage identified by the TextureArgument enumeration.

The default argument is TextureArgument.TextureColor. If no texture is set for this stage, the default argument is TextureArgument.Diffuse. Specify TextureArgument.Temp to select a temporary register color for read or write. TextureArgument.Temp is supported if the MiscCaps.SupportsTextureStageStateArgumentTemp device capability is present. The default value for the register is (0.0, 0.0, 0.0, 0.0).
AlphaOperation 4 Defines the texture-stage state as a texture alpha-blending operation identified by the TextureOperation enumeration.

The default value for the first texture stage (stage 0) is TextureOperation.SelectArg1, and for all other stages is TextureOperation.Disable.
ColorArgument2 3 Defines the texture-stage state as the second color argument for the stage identified by the TextureArgument enumeration.

The default argument is TextureArgument.Current. Specify TextureArgument.Temp to select a temporary register color for read or write. TextureArgument.Temp is supported if the MiscCaps.SupportsTextureStageStateArgumentTemp device capability is present. The default value for the register is (0.0, 0.0, 0.0, 0.0).
ColorArgument1 2 Defines the texture-stage state as the first color argument for the stage identified by the TextureArgument enumeration.

The default argument is TextureArgument.Texture. Specify TextureArgument.Temp to select a temporary register color for read or write. TextureArgument.Temp is supported if the MiscCaps.SupportsTextureStageStateArgumentTemp device capability is present. The default value for the register is (0.0, 0.0, 0.0, 0.0).
ColorOperation 1 Defines the texture-stage state as a texture color-blending operation identified by the TextureOperation enumeration.

The default value for the first texture stage (stage 0) is TextureOperation.Modulate, and for all other stages is TextureOperation.Disable.

Remarks

These enumeration constants and values are used by the Device.SetTextureStageState method.

Enumeration Information

Namespace Microsoft.DirectX.Direct3D
Assembly Microsoft.DirectX.Direct3D (microsoft.directx.direct3d.dll)
Strong Name Microsoft.DirectX.Direct3D,  Version=1.0.900.0,  Culture=neutral,  PublicKeyToken=d3231b57b74a1492

See Also