<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/EnvironmentLightingConfigurationComponent",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation41EnvironmentLightingConfigurationComponentV"
  },
  "title" : "EnvironmentLightingConfigurationComponent"
}
-->

# EnvironmentLightingConfigurationComponent

A component that scales the amount of light that an entity receives from its environment.

```
struct EnvironmentLightingConfigurationComponent
```

## Overview

When rendering a RealityKit scene, you can control how much the environment’s
lighting affects the virtual objects in your scene, such as the lighting from your
real-world surroundings, a virtual environment, or both.
Use an `EnvironmentLightingConfigurationComponent` to configure this amount for an entity.

For example, create an entity that receives no lighting from its environment by setting the weight to `0.0`.

```swift
let spaceship = try await Entity(named: "spaceship")
spaceship.components.set(EnvironmentLightingConfigurationComponent(
    environmentLightingWeight: 0.0))
```

> Note: The weight value of the component also affects the lighting of the entity’s descendants.

## Topics

### Creating an environment-lighting configuration component

[`init(environmentLightingWeight:)`](/documentation/RealityKit/EnvironmentLightingConfigurationComponent/init(environmentLightingWeight:))

Creates an environment-lighting configuration component.

### Scaling the environment-lighting contribution

[`environmentLightingWeight`](/documentation/RealityKit/EnvironmentLightingConfigurationComponent/environmentLightingWeight)

A value that controls the environment-lighting contribution to an entity’s lighting.

### Comparing environment-lighting configuration components

---

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)