<!--
{
  "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/incrementClamp",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@E@MTLStencilOperation@MTLStencilOperationIncrementClamp"
  },
  "title" : "MTLStencilOperation.incrementClamp"
}
-->

# MTLStencilOperation.incrementClamp

A stencil operation that increases a stencil value by one, but only when
the current value isn’t the maximum representable value.

```
case incrementClamp
```

## Discussion

The operation doesn’t modify a stencil value if its currently 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)