---
title: opacityThreshold
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/unlitmaterial/opacitythreshold
---

# opacityThreshold

A threshold below which RealityKit ignores opacity.

## Declaration

```swift
var opacityThreshold: Float? { get set }
```

## Discussion

Discussion When opacityThreshold is set, RealityKit discards pixels with opacity values less than the opacityThreshold, and renders opacity values greater than or equal to opacityThreshold fully opaque. note: When the opacityThreshold property is set, the blend mode of the blending property is ignored and the renderer applies the masking behavior.

## See Also

### Controlling opacity

- [blending](realitykit/unlitmaterial/blending-swift.property.md)
