<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLStencilOperation/incrementWrap",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@E@MTLStencilOperation@MTLStencilOperationIncrementWrap"
  },
  "title" : "MTLStencilOperation.incrementWrap"
}
-->

# MTLStencilOperation.incrementWrap

A stencil operation that decreases a nonzero stencil value by one,
or when it’s the maximum representable value, resets it to zero.

```
case incrementWrap
```

## Discussion

The operation sets a stencil value to `0` if it’s currently equal to the maximum representable value.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)