Instance Property

wantsHDREnvironmentTextures

A flag that instructs ARKit to create environment textures in HDR format.

Declaration

var wantsHDREnvironmentTextures: Bool { get set }

Discussion

If you set environmentTexturing to .automatic in iOS 12 or later, ARKit gives you environment textures you cast on your app's virtual content to create realistic reflections. By default, wantsHDREnvironmentTextures is set to true. When your renderer supports HDR environment textures in iOS 13, it enables your lighting engine to output more colors, with a more realistic result.

Screenshot showing low and high dynamic range environment textures in a side by side comparison.

Both ARView and ARSCNView support HDR environment textures. For more information, see Adding Realistic Reflections to an AR Experience.

For a Metal app that doesn't yet support HDR environment textures, you can use the following code to receive LDR environment textures until you're ready to update your renderer for HDR.

if #available(iOS 13, *) { 
    configuration.wantsHDREnvironmentTextures = false
}

See Also

Creating Realistic Reflections

var environmentTexturing: ARWorldTrackingConfiguration.EnvironmentTexturing

The behavior ARKit uses for generating environment textures.

enum ARWorldTrackingConfiguration.EnvironmentTexturing

Options for generating environment textures in a world-tracking AR session.

class AREnvironmentProbeAnchor

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