<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNCamera/averageGray",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNCamera(py)averageGray"
  },
  "title" : "averageGray"
}
-->

# averageGray

The luminance level to use as the midpoint of a tone mapping curve.

```
var averageGray: CGFloat { get set }
```

## Discussion

When using a High Dynamic Range (HDR) camera, SceneKit applies a process called *tone mapping* to translate the wide range of luminance values in the visible scene to the narrower range of brightness values that can be shown on a display. SceneKit determines a tone mapping curve from the [`minimumExposure`](/documentation/SceneKit/SCNCamera/minimumExposure), [`maximumExposure`](/documentation/SceneKit/SCNCamera/maximumExposure), [`exposureOffset`](/documentation/SceneKit/SCNCamera/exposureOffset), and [`whitePoint`](/documentation/SceneKit/SCNCamera/whitePoint) properties, along with this property which serves as a constant estimate of scene luminance.

The default value is `0.18`. By setting this property to a higher or lower value, you can compensate for scenes with darker or brighter content. Alternatively, by setting the [`wantsExposureAdaptation`](/documentation/SceneKit/SCNCamera/wantsExposureAdaptation) property, you can allow SceneKit to automatically adjust exposure as the visible contents of the scene change.

This property has no effect if the [`wantsHDR`](/documentation/SceneKit/SCNCamera/wantsHDR) value is <doc://com.apple.documentation/documentation/Swift/false>. If the [`exposureAdaptationDarkeningSpeedFactor`](/documentation/SceneKit/SCNCamera/exposureAdaptationDarkeningSpeedFactor) value is <doc://com.apple.documentation/documentation/Swift/true>, SceneKit ignores this property, and instead computes the average luminance currently visible to the camera during rendering.

---

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)