Partager via


TextureOperation Enumeration

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Defines per-stage texture-blending operations.

Namespace:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Syntax

'Declaration
Public Enumeration TextureOperation
'Usage
Dim instance As TextureOperation
public enum TextureOperation
public enum class TextureOperation
type TextureOperation

Members

Member name Description
Supported by the .NET Compact Framework Disable 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.
Supported by the .NET Compact Framework SelectArg1 Uses this texture stage's first color or alpha argument, unmodified, as the output. This operation affects the color and alpha arguments used with the ColorOperation and AlphaOperation properties of a TextureStateManager, respectively.

S RGBA = Arg1

Supported by the .NET Compact Framework SelectArg2 Uses this texture stage's second color or alpha argument, unmodified, as the output. This operation affects the color and alpha arguments used with the ColorOperation and AlphaOperation properties of a TextureStateManager, respectively.

S RGBA = Arg2

Supported by the .NET Compact Framework Modulate Multiplies the components of the arguments.

S RGBA = Arg1 * Arg2

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

S RGBA = (Arg1 * Arg2) << 1

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

S RGBA = (Arg1 * Arg2) << 2

Supported by the .NET Compact Framework Add Adds the components of the second argument to the first argument.

S RGBA = Arg1 + Arg2

Supported by the .NET Compact Framework AddSigned Adds the components of the arguments with a -0.5 bias, making the effective range of values -0.5 through 0.5.

S RGBA = Arg1 + Arg2 -0.5

Supported by the .NET Compact Framework AddSigned2X Adds the components of the arguments with a -0.5 bias and shifts the products 1 bit to the left.

S RGBA = (Arg1 + Arg2 -0.5) << 1

Supported by the .NET Compact Framework Subtract Subtracts the components of the second argument from those of the first argument.

S RGBA = Arg1 - Arg2

Supported by the .NET Compact Framework AddSmooth Adds the first and second arguments, then subtracts their product from the sum.

S RGBA = Arg1 + Arg2 - Arg1 * Arg2

Supported by the .NET Compact Framework BlendDiffuseAlpha Performs linear blending on the current texture stage, using the interpolated alpha from each vertex.

S RGBA = Arg1 * (Alpha) + Arg2 * (1 - Alpha)

Supported by the .NET Compact Framework BlendTextureAlpha Performs linear blending on the current texture stage, using the interpolated alpha from each vertex.

S RGBA = Arg1 * (Alpha) + Arg2 * (1 - Alpha)

Supported by the .NET Compact Framework BlendFactorAlpha Performs linear blending on the current texture stage, using a scalar alpha set with the TextureFactor property for a RenderStateManager.

S RGBA = Arg1 * (Alpha) + Arg2 * (1 - Alpha)

Supported by the .NET Compact Framework BlendTextureAlphaPM Performs linear blending on the current texture stage that uses a premultiplied alpha.

S RGBA = Arg1 + Arg2 * (1 - Alpha)

Supported by the .NET Compact Framework BlendCurrentAlpha Performs linear blending on the current texture stage, using the alpha taken from the previous texture stage.

S RGBA = Arg1 * (Alpha) + Arg2 * (1 - Alpha)

Supported by the .NET Compact Framework PreModulate This flag is set in stage n, the output of which is arg1. If stage n + 1 contains a texture, then the Current value of a TextureArgument is premultiplied by that texture.
Supported by the .NET Compact Framework ModulateAlphaAddColor 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 by using the ColorOperation property of a TextureStateManager.

S RGBA = Arg1 RGB + Arg1 A * Arg2 RGB

Supported by the .NET Compact Framework ModulateColorAddAlpha Modulates the arguments, then adds the alpha of the first argument. This operation is supported only by using the ColorOperation property of a TextureStateManager.

S RGBA = Arg1 RGB * Arg2 RGB + Arg1 A

Supported by the .NET Compact Framework ModulateInvAlphaAddColor Similar to ModulateAlphaAddColor, but uses the inverse of the alpha of the first argument. This operation is supported only by using the ColorOperation property of a TextureStateManager.

S RGBA = (1 - Arg1 A ) * Arg2 RGB + Arg1 RGB

Supported by the .NET Compact Framework ModulateInvColorAddAlpha Similar to ModulateColorAddAlpha, but uses the inverse of the color of the first argument. This operation is supported only by using the ColorOperation property of a TextureStateManager.

S RGBA = (1 - Arg1 RGB ) * Arg2 RGB + Arg1 A

Supported by the .NET Compact Framework DotProduct3 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.

S RGBA = (Arg1 R * Arg2 R + Arg1 G * Arg2 G + Arg1 B * Arg2 B )

Supported by the .NET Compact Framework MultiplyAdd Performs a multiply-accumulate operation, in which this field multiplies the last two arguments, adds them to the remaining input/source argument, and places that into the result.

S RGBA = Arg1 + Arg2 *Arg3

Supported by the .NET Compact Framework Lerp Performs linear interpolation between the second and third source arguments by a proportion specified in the first source argument.

S RGBA = (Arg1) * Arg2 + (1 - Arg1) * Arg3.

Platforms

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

Microsoft.WindowsMobile.DirectX.Direct3D Namespace

Other Resources

Mobile Direct3D Programming in the .NET Compact Framework