Table of Contents

Enum CompareFunction

Namespace
Stride.Graphics
Assembly
Stride.dll

Identifies comparison functions that can be used to determine how the runtime compares source (new) data against destination (existing) data before storing the new data.

[DataContract]
public enum CompareFunction
Extension Methods

Fields

Always = 8

Always pass the comparison.

Equal = 3

If the source data is equal to the destination data, the comparison passes.

Greater = 5

If the source data is greater than the destination data, the comparison passes.

GreaterEqual = 7

If the source data is greater than or equal to the destination data, the comparison passes.

Less = 2

If the source data is less than the destination data, the comparison passes.

LessEqual = 4

If the source data is less than or equal to the destination data, the comparison passes.

Never = 1

Never pass the comparison.

NotEqual = 6

If the source data is not equal to the destination data, the comparison passes.

Remarks

The comparison functions can be used for a Depth-Stencil Buffer (see DepthStencilState) for depth comparisons or rejections, or for stencil operations, or for Texture sampling (see SamplerState).