Contents

disableAREnvironmentLighting

Disable lighting from environment probes.

Declaration

static let disableAREnvironmentLighting: ARView.RenderOptions

Discussion

By default, RealityKit automatically creates light probes to record the lighting conditions both globally, and at appropriate points in the scene. The framework adjusts the complexity of the light probe set to match the capabilities of the GPU. For example, it might use only a global probe on less capable devices. It then applies environment lighting to virtual objects based on the probes.

To disable this effect, add this option to the renderOptions set.

Alternatively, to use environment lighting but control the probes manually, ensure the render option set doesn’t include this option. Then configure the session for manual environment texturing, using the ARWorldTrackingConfiguration.EnvironmentTexturing.manual value.

For more information about creating and placing probes manually, see Adding realistic reflections to an AR experience.

See Also

Disabling rendering effects