---
title: sphericalHarmonicsCoefficients
framework: arkit
role: symbol
role_heading: Instance Property
path: arkit/ardirectionallightestimate/sphericalharmonicscoefficients
---

# sphericalHarmonicsCoefficients

Data describing the estimated lighting environment in all directions.

## Declaration

```swift
var sphericalHarmonicsCoefficients: Data { get }
```

## Discussion

Discussion Spherical harmonics provide a compact mathematical model for the global lighting environment around a point in space, describing the distribution and colors of multiple directional light sources. When used in a renderer that supports environment-based lighting, spherical harmonics provide much less high-frequency detail than a cube map texture, but make much more efficient use of GPU resources. ARKit provides second-level spherical harmonics in separate red, green, and blue data planes. Thus, this data buffer contains 3 sets of 9 coefficients, or a total of 27 values of 32-bit floating point type.

## See Also

### Examining Light Parameters

- [primaryLightDirection](arkit/ardirectionallightestimate/primarylightdirection.md)
- [primaryLightIntensity](arkit/ardirectionallightestimate/primarylightintensity.md)
