Enumeration

MTLCompareFunction

Options used to specify how a sample compare operation should be performed on a depth texture.

Declaration

typedef enum MTLCompareFunction : NSUInteger {
    ...
} MTLCompareFunction;

Overview

Whenever the comparison test passes, the incoming fragment is compared to the stored data at the specified location.

Topics

Compare function options

MTLCompareFunctionNever

A new value never passes the comparison test.

MTLCompareFunctionLess

A new value passes the comparison test if it is less than the existing value.

MTLCompareFunctionEqual

A new value passes the comparison test if it is equal to the existing value.

MTLCompareFunctionLessEqual

A new value passes the comparison test if it is less than or equal to the existing value.

MTLCompareFunctionGreater

A new value passes the comparison test if it is greater than the existing value.

MTLCompareFunctionNotEqual

A new value passes the comparison test if it is not equal to the existing value.

MTLCompareFunctionGreaterEqual

A new value passes the comparison test if it is greater than or equal to the existing value.

MTLCompareFunctionAlways

A new value always passes the comparison test.

See Also

Declaring the Depth Comparison Mode

compareFunction

The sampler comparison function used when performing a sample compare operation on a depth texture.