CompareMode

The method used to compare depth and stencil values when performing the depth and stencil tests. Also used for compare modes in Samplers.

ValueDescription
noneThe test does not take place, and acts as though it always passes.
equalThe test passes if the values are equal.
notequalThe test passes if the values are not equal.
lessThe test passes if the value is less than the existing one.
lequalThe test passes if the value is less than or equal to the existing one.
greaterThe test passes if the value is greater than the existing one.
gequalThe test passes if the value is greater than or equal to the existing one.

Notes

This type can also be specified using mathematical notation, e.g. =, >, <=, etc. notequal can be provided as ~= or !=.

See also