<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PhysicallyBasedMaterial/blending-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation23PhysicallyBasedMaterialV8blendingAC8BlendingOvp"
  },
  "title" : "blending"
}
-->

# blending

The transparency of an entity.

```
var blending: PhysicallyBasedMaterial.Blending { get set }
```

## Discussion

Use this property to specify whether an entity is opaque or transparent.
To create an entity that’s opaque, assign
[`PhysicallyBasedMaterial.Blending.opaque`](/documentation/RealityKit/PhysicallyBasedMaterial/Blending-swift.enum/opaque) to this property.

```swift
material.blending = .opaque
```

To create a translucent or transparent object using a single opacity
value for the entire material, initialize
[`PhysicallyBasedMaterial.Blending.transparent(opacity:)`](/documentation/RealityKit/PhysicallyBasedMaterial/Blending-swift.enum/transparent(opacity:))
using a `Float` value.

```swift
material.blending = .transparent(opacity: .init(floatLiteral:0.5))
```

To use a UV-mapped grayscale image texture to specify different opacity
values for different parts of an entity, initialize
[`PhysicallyBasedMaterial.Blending.transparent(opacity:)`](/documentation/RealityKit/PhysicallyBasedMaterial/Blending-swift.enum/transparent(opacity:))
using a texture. If you provide a color image, RealityKit only uses the
intensity of the red channel.

```swift
if let opacityResource = try? TextureResource.load(named:
"entity_opacity") {
    let opacityMap = MaterialParameters.Texture(opacityResource)
    material.blending = .transparent(opacity: .init(texture: opacityMap))
}
```

---

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)