Export (0) Print
Expand All

TextureOperation Enumeration (Microsoft.DirectX.Direct3D)

Defines per-stage texture-blending operations.

Definition

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

Members

Member Value Description
Subtract 10 Subtracts the components of the second argument from those of the first argument.

SRGBA = Arg1 - Arg2

Lerp 26 Performs linear interpolation between the second and third source arguments by a proportion specified in the first source argument.

SRGBA = (Arg1) * Arg2 + (1- Arg1) * Arg3.

MultiplyAdd 25 Performs a multiply-accumulate operation, in which it multiplies the last two arguments, adds them to the remaining input/source argument, and places that into the result.

SRGBA = Arg1 + Arg2 *Arg3

DotProduct3 24 Modulates the components of each argument as signed components, adds their products, and replicates the sum to all color channels, including alpha. This operation is supported for color and alpha operations.

SRGBA = (Arg1R * Arg2R + Arg1G * Arg2G + Arg1B * Arg2B)

BumpEnvironmentMapLuminance 23 Performs per-pixel bump mapping, using the environment map in the next texture stage with luminance. This operation is supported only for color operations (TextureState.ColorOperation).
BumpEnvironmentMap 22 Performs bump mapping on each pixel, using the environment map in the next texture stage without luminance. This operation is supported only for color operations (TextureState.ColorOperation).
ModulateInvColorAddAlpha 21 Similar to ModulateColorAddAlpha, but uses the inverse of the color of the first argument. This operation is supported only for color operations (TextureState.ColorOperation).

SRGBA = (1 - Arg1RGB) * Arg2RGB + Arg1A

ModulateInvAlphaAddColor 20 Similar to ModulateAlphaAddColor, but uses the inverse of the alpha of the first argument. This operation is supported only for color operations (TextureState.ColorOperation).

SRGBA = (1 - Arg1A) * Arg2RGB + Arg1RGB

ModulateColorAddAlpha 19 Modulates the arguments, then adds the alpha of the first argument. This operation is supported only for color operations (TextureState.ColorOperation).

SRGBA = Arg1RGB * Arg2RGB + Arg1A

ModulateAlphaAddColor 18 Modulates the color of the second argument using the alpha of the first argument, then adds the result to argument one. This operation is supported only for color operations (TextureStateManager.ColorOperation).

SRGBA = Arg1RGB + Arg1A * Arg2RGB

PreModulate 17 This flag is set in stage n, the output of which is arg1. If stage n + 1 contains a texture, any Current value in stage n + 1 is premultiplied by that texture.
BlendCurrentAlpha 16 Performs linear blending on the current texture stage, using the alpha taken from the previous texture stage.

SRGBA = Arg1 * (Alpha) + Arg2 * (1 - Alpha)

BlendTextureAlphaPM 15 Performs linear blending on the current texture stage that uses a premultiplied alpha.

SRGBA = Arg1 + Arg2 * (1 - Alpha)

BlendFactorAlpha 14 Performs linear blending on the current texture stage, using a scalar alpha set with the RenderStateManager.TextureFactor property.

SRGBA = Arg1 * (Alpha) + Arg2 * (1 - Alpha)

BlendTextureAlpha 13 Performs linear blending on the current texture stage, using the interpolated alpha from each vertex.

SRGBA = Arg1 * (Alpha) + Arg2 * (1 - Alpha)

BlendDiffuseAlpha 12 Performs linear blending on the current texture stage, using the interpolated alpha from each vertex.

SRGBA = Arg1 * (Alpha) + Arg2 * (1 - Alpha)

AddSmooth 11 Adds the first and second arguments, then subtracts their product from the sum.

SRGBA = Arg1 + Arg2 - Arg1 * Arg2

AddSigned2X 9 Adds the components of the arguments with a -0.5 bias and shifts the products 1 bit to the left.

SRGBA = (Arg1 + Arg2 - 0.5) << 1

AddSigned 8 Adds the components of the arguments with a -0.5 bias, making the effective range of values -0.5 through 0.5.

SRGBA = Arg1 + Arg2 -0.5

Add 7 Adds the components of the arguments.

SRGBA = Arg1 + Arg2

Modulate4X 6 Multiplies the components of the arguments, then shifts the products 2 bits to the left (effectively multiplying them by 4) for brightening.

SRGBA = (Arg1 * Arg2) << 2

Modulate2X 5 Multiplies the components of the arguments, then shifts the products 1 bit to the left (effectively multiplying them by 2) for brightening.

SRGBA = (Arg1 * Arg2) << 1

Modulate 4 Multiplies the components of the arguments.

SRGBA = Arg1 * Arg2

SelectArg2 3 Uses this texture stage's second color or alpha argument, unmodified, as the output. This operation affects the color argument when used with the TextureStateManager.ColorOperation property, and the alpha argument when used with the TextureStateManager.AlphaOperation property.

SRGBA = Arg2

SelectArg1 2 Uses this texture stage's first color or alpha argument, unmodified, as the output. This operation affects the color argument when used with the TextureStateManager.ColorOperation property, and the alpha argument when used with the TextureStateManager.AlphaOperation property.

SRGBA = Arg1

Disable 1 Disables output from the texture stage and all stages with a higher index. To disable texture mapping, set this flag as the color operation for the first texture stage (stage 0). Alpha operations cannot be disabled when color operations are enabled. Setting the alpha operation to Disable when color blending is enabled causes undefined behavior.

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

Show:
© 2014 Microsoft