Contents

compareFunction

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

Declaration

var compareFunction: MTLCompareFunction { get set }

Discussion

The default value is MTLCompareFunction.never.

The MTLFeatureSet.iOS_GPUFamily3_v1 and MTLFeatureSet.iOS_GPUFamily1_v1 feature sets allow you to define a framework-side sampler comparison function for an MTLSamplerState instance. All feature sets support shader-side sampler comparison functions, as described in the Metal Shading Language Specification.

See Also

Declaring the depth comparison mode