Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CompareFunction Enumeration

Defines comparison functions that can be chosen for alpha, stencil, or depth-buffer tests.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

public enum CompareFunction

 Member nameDescription
AlwaysAlways pass the test.
EqualAccept the new pixel if its value is equal to the value of the current pixel.
GreaterAccept the new pixel if its value is greater than the value of the current pixel.
GreaterEqualAccept the new pixel if its value is greater than or equal to the value of the current pixel.
LessAccept the new pixel if its value is less than the value of the current pixel.
LessEqualAccept the new pixel if its value is less than or equal to the value of the current pixel.
NeverAlways fail the test.
NotEqualAccept the new pixel if its value does not equal the value of the current pixel.

Xbox 360, Windows 7, Windows Vista, Windows XP

Community Additions

Show:
© 2017 Microsoft