An object that provides environmental lighting information for a specific area of space in a world-tracking AR session.


Environment textures depict the view in all directions from a specific point in a scene. In 3D asset rendering, environment textures are the basis for image-based lighting algorithms where surfaces can realistically reflect light from their surroundings. ARKit can generate environment textures during an AR session using camera imagery, allowing SceneKit or a custom rendering engine to provide realistic image-based lighting for virtual objects in your AR experience.

To enable texture map generation for an AR session, set the environmentTexturing property:

In both cases, ARKit automatically generates environment textures as the session collects camera imagery. Use a delegate method such as session(_:didUpdate:) to find out when a texture is available, and access it from the anchor's environmentTexture property.

If you display AR content using ARSCNView and the automaticallyUpdatesLighting option, SceneKit automatically retrieves AREnvironmentProbeAnchor texture maps and uses them to light the scene.


Creating Probe Anchors

init(transform: simd_float4x4, extent: simd_float3)

Creates a new environment probe anchor.

init(name: String, transform: simd_float4x4, extent: simd_float3)

Creates a new anchor object with a descriptive name.

Accessing Texture Maps

var environmentTexture: MTLTexture?

A cube map texture representing the view in all directions from the probe anchor's position.

Examining a Probe Anchor

var extent: simd_float3

The area around the anchor's position to use when projecting its texture for parallax correction.


Inherits From

Conforms To

See Also

World Tracking

Building Your First AR Experience

Create an app that runs an AR session and uses plane detection to place 3D content using SceneKit.

Understanding World Tracking in ARKit

Discover supporting concepts, features, and best practices for building great AR experiences.

class ARWorldTrackingConfiguration

A configuration that uses the back-facing camera, tracks a device's orientation and position, and detects real-world surfaces, and known images or objects.

class ARPlaneAnchor

Information about the position and orientation of a real-world flat surface detected in a world-tracking AR session.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software