Skip to content

GpuCompare

1 min read

Import: import system.gpu;

This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation. Shader-only declarations can be used only inside @compute, @vertex, @fragment, inferred helpers and ray tracing shader functions; using them elsewhere is a compile error.

GpuCompare

A comparison between a new value and a stored one, used by depth tests and comparison samplers. The test passes when new <op> stored holds.

public enum GpuCompare

Never

Never passes.

Never = 0

Less

Passes when the new value is smaller.

Less = 1

LessEqual

Passes when the new value is smaller or equal.

LessEqual = 2

Equal

Passes when the values are equal.

Equal = 3

GreaterEqual

Passes when the new value is greater or equal.

GreaterEqual = 4

Greater

Passes when the new value is greater.

Greater = 5

NotEqual

Passes when the values differ.

NotEqual = 6

Always

Always passes.

Always = 7