Visual3D Game EngineAPI Documentation for XNA, C#, VB, and .NET
Assembly: Visual3D.Engine (in Visual3D.Engine.dll) Version: 1.0.0.0 (1.0.0.0)
Sets the alpha operation to be applied to this texture.
Namespace: Visual3D.Graphics3DAssembly: Visual3D.Engine (in Visual3D.Engine.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
| C# | Visual Basic |
public void SetAlphaOperation( TextureOperation operation, LayerBlendSource source1, LayerBlendSource source2, float arg1, float arg2, float blendFactor )
Public Sub SetAlphaOperation ( _ operation As TextureOperation, _ source1 As LayerBlendSource, _ source2 As LayerBlendSource, _ arg1 As Single, _ arg2 As Single, _ blendFactor As Single _ )
Parameters
- operation
- TextureOperation
The operation to be used, e.g. modulate (multiply), add, subtract.
- source1
- LayerBlendSource
The source of the first alpha value to the operation e.g. texture alpha.
- source2
- LayerBlendSource
The source of the second alpha value to the operation e.g. current surface alpha.
- arg1
- Single
Manually supplied alpha value (only required if source1 = LayerBlendSource.Manual).
- arg2
- Single
Manually supplied alpha value (only required if source2 = LayerBlendSource.Manual).
- blendFactor
- Single
Manually supplied 'blend' value - only required for operations which require manual blend e.g. LayerBlendOperationEx.BlendManual.
Remarks
This works in exactly the same way as SetColorOperation, except
that the effect is applied to the level of alpha (i.e. transparency)
of the texture rather than its color. When the alpha of a texel (a pixel
on a texture) is 1.0, it is opaque, wheras it is fully transparent if the
alpha is 0.0. Please refer to the SetColorOperation method for more info.