Table of Contents

Class AlphaTestEffect

Namespace
Microsoft.Xna.Framework.Graphics
Assembly
MonoGame.Framework.dll

Built-in effect that supports alpha testing.

public class AlphaTestEffect : Effect, IDisposable, IEffectMatrices, IEffectFog
Inheritance
AlphaTestEffect
Implements
Inherited Members

Constructors

AlphaTestEffect(AlphaTestEffect)

Creates a new AlphaTestEffect by cloning parameter settings from an existing instance.

protected AlphaTestEffect(AlphaTestEffect cloneSource)

Parameters

cloneSource AlphaTestEffect

AlphaTestEffect(GraphicsDevice)

Creates a new AlphaTestEffect with default parameter settings.

public AlphaTestEffect(GraphicsDevice device)

Parameters

device GraphicsDevice

Properties

Alpha

Gets or sets the material alpha.

public float Alpha { get; set; }

Property Value

float

AlphaFunction

Gets or sets the alpha compare function (default Greater).

public CompareFunction AlphaFunction { get; set; }

Property Value

CompareFunction

DiffuseColor

Gets or sets the material diffuse color (range 0 to 1).

public Vector3 DiffuseColor { get; set; }

Property Value

Vector3

FogColor

Gets or sets the fog color.

public Vector3 FogColor { get; set; }

Property Value

Vector3

FogEnabled

Gets or sets the fog enable flag.

public bool FogEnabled { get; set; }

Property Value

bool

FogEnd

Gets or sets the fog end distance.

public float FogEnd { get; set; }

Property Value

float

FogStart

Gets or sets the fog start distance.

public float FogStart { get; set; }

Property Value

float

Projection

Gets or sets the projection matrix.

public Matrix Projection { get; set; }

Property Value

Matrix

ReferenceAlpha

Gets or sets the reference alpha value (default 0).

public int ReferenceAlpha { get; set; }

Property Value

int

Texture

Gets or sets the current texture.

public Texture2D Texture { get; set; }

Property Value

Texture2D

VertexColorEnabled

Gets or sets whether vertex color is enabled.

public bool VertexColorEnabled { get; set; }

Property Value

bool

View

Gets or sets the view matrix.

public Matrix View { get; set; }

Property Value

Matrix

World

Gets or sets the world matrix.

public Matrix World { get; set; }

Property Value

Matrix

Methods

Clone()

Creates a clone of the current AlphaTestEffect instance.

public override Effect Clone()

Returns

Effect

OnApply()

Lazily computes derived parameter values immediately before applying the effect.

protected override void OnApply()