<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PortalComponent/lightingBlendDistance",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation15PortalComponentV21lightingBlendDistanceSfvp"
  },
  "title" : "lightingBlendDistance"
}
-->

# lightingBlendDistance

The distance over which crossing-entity lighting blends between the host scene and the portal world.

```
var lightingBlendDistance: Float { get set }
```

## Discussion

As an entity with [`PortalCrossingComponent`](/documentation/RealityKit/PortalCrossingComponent) crosses the portal boundary, RealityKit
transitions its lighting from the host scene’s environment to the portal world’s
environment. This property controls the width, in meters, of that transition:

- A value of `0` produces a sharp lighting boundary, with the entity fully lit by the
  portal world on the inside and the host scene on the outside.
- A positive value produces a smooth gradient that spans the given distance into the portal
  world, portal crossing entities are unaffected by this value.

The boundary used for the distance calculation is the geometry you configure with
[`crossingMode`](/documentation/RealityKit/PortalComponent/crossingMode-swift.property): a plane for [`PortalComponent.CrossingMode.plane(_:)`](/documentation/RealityKit/PortalComponent/CrossingMode-swift.enum/plane(_:)),
or a box for [`PortalComponent.CrossingMode.volume(_:)`](/documentation/RealityKit/PortalComponent/CrossingMode-swift.enum/volume(_:)).

> Note: This property only affects rendering when ``doc://com.apple.RealityKit/documentation/RealityKit/PortalComponent/crossingMode-swift.property`` is enabled.

---

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)