<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/RealityViewRenderingEffects/cameraGrain",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:19_RealityKit_SwiftUI0A20ViewRenderingEffectsV11cameraGrainAA0aeF10EffectModeVvp"
  },
  "title" : "cameraGrain"
}
-->

# cameraGrain

Enables or disables an image noise effect for virtual content.

```
var cameraGrain: RealityViewRenderingEffectMode
```

## Discussion

Images from a camera may contain a small amount of noise, called
*camera grain*, that increases as the available light decreases.
Virtual objects rendered without noise and placed into an otherwise
grainy image look out of place. You can use RealityKit to add noise
to the rendered output to match noise in the camera feed.

|Without camera grain                                                                                                                                                                                                                  |With camera grain                                                                                                                                                                                                                       |
|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|![A screenshot of a scene with a blue sphere on a white surface. The white surface has grain, but the blue sphere does not, which makes the sphere appear out of place.](ARView-RenderOptions-swift-struct-disableCameraGrain-without)|![A screenshot of a scene with a blue sphere on a white surface. The white surface and the sphere both have gain, which makes the sphere better blend into the surroundings.](ARView-RenderOptions-swift-struct-disableCameraGrain-with)|

Applying this effect involves a low, constant GPU cost. To enable or
disable camera grain, set the `cameraGrain` property of the view’s
[`renderingEffects`](/documentation/RealityKit/RealityViewCameraContent/renderingEffects).

When deciding whether to use any effect, be sure to consider your
app’s CPU and GPU utilization, as described in
[Improving the Performance of a RealityKit App](/documentation/RealityKit/improving-the-performance-of-a-realitykit-app).

> Important: This rendering effect is unavailable on macOS.

---

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)