# GpuStencilOperation

`import { GpuStencilOperation } from "destack:gpu/binding";`

Stencil operation selector.

```ds title="GpuStencilOperation"
export enum GpuStencilOperation {
    Keep = 0,
    Zero = 1,
    Replace = 2,
    Invert = 3,
    IncrementClamp = 4,
    DecrementClamp = 5,
    IncrementWrap = 6,
    DecrementWrap = 7,
}
```

[language/library/src/gpu/binding/pipeline.ds:365:382](https://github.com/destack-sh/destack/blob/main/language/library/src/gpu/binding/pipeline.ds#L365-L382)

## Variants

### `Keep = 0`

Keep the current stencil value.

### `Zero = 1`

Set stencil to zero.

### `Replace = 2`

Replace stencil with the reference value.

### `Invert = 3`

Bitwise invert the current stencil value.

### `IncrementClamp = 4`

Increment and clamp stencil.

### `DecrementClamp = 5`

Decrement and clamp stencil.

### `IncrementWrap = 6`

Increment and wrap stencil.

### `DecrementWrap = 7`

Decrement and wrap stencil.
