Share via


AlphaTestEffect Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Contains a configurable effect that supports alpha testing.

Inheritance Hierarchy

System.Object
  Microsoft.Xna.Framework.Graphics.Effect
    Microsoft.Xna.Framework.Graphics.AlphaTestEffect

Namespace:  Microsoft.Xna.Framework.Graphics
Assembly:  Microsoft.Xna.Framework.Graphics.Extensions (in Microsoft.Xna.Framework.Graphics.Extensions.dll)

Syntax

'Declaration
Public Class AlphaTestEffect _
    Inherits Effect _
    Implements IEffectMatrices, IEffectFog
public class AlphaTestEffect : Effect, 
    IEffectMatrices, IEffectFog

The AlphaTestEffect type exposes the following members.

Constructors

  Name Description
Public method AlphaTestEffect Initializes a new instance of the AlphaTestEffect class.

Top

Properties

  Name Description
Public property Alpha Gets or sets the material alpha which determines its transparency. Range is between 1 (fully opaque) and 0 (fully transparent).
Public property AlphaFunction Gets or sets the compare function for alpha test. The default value is Greater.
Public property CurrentTechnique Gets or sets the active technique. (Inherited from Effect.)
Public property DiffuseColor Gets or sets the diffuse color for a material, the range of color values is from 0 to 1.
Public property FogColor Gets or sets the fog color, the range of color values is from 0 to 1.
Public property FogEnabled Gets or sets the fog enable flag.
Public property FogEnd Gets or sets the maximum z value for fog.
Public property FogStart Gets or sets the minimum z value for fog.
Public property IsDisposed Gets a value that indicates whether the object is disposed. (Inherited from Effect.)
Public property Projection Gets or sets the projection matrix.
Public property ReferenceAlpha Gets or sets the reference alpha value, the default value is 0.
Public property Techniques Gets a collection of techniques that are defined for this effect. (Inherited from Effect.)
Public property Texture Gets or sets the current texture.
Public property VertexColorEnabled Gets or sets whether vertex color is enabled.
Public property View Gets or sets the view matrix.
Public property World Gets or sets the world matrix.

Top

Methods

  Name Description
Public method Dispose() Immediately releases the unmanaged resources used by this object. (Inherited from Effect.)
Protected method Dispose(Boolean) Releases the unmanaged resources used by the Effect and optionally releases the managed resources. (Inherited from Effect.)
Protected method Finalize Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object. (Inherited from Effect.)

Top

Version Information

Silverlight

Supported in: 5

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.