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

# opacityThreshold

A threshold below which RealityKit ignores opacity.

## Declaration

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

## Mentioned in

Applying realistic material and lighting effects to entities

## 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

### Specifying opacity

- [PhysicallyBasedMaterial.Blending.opaque](realitykit/physicallybasedmaterial/blending-swift.enum/opaque.md)
- [PhysicallyBasedMaterial.Blending.transparent(opacity:)](realitykit/physicallybasedmaterial/blending-swift.enum/transparent(opacity:).md)
- [PhysicallyBasedMaterial.Opacity](realitykit/physicallybasedmaterial/opacity.md)
