Contents

disableCameraGrain

Disable the image noise effect.

Declaration

static let disableCameraGrain: ARView.RenderOptions

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

[Image]

[Image]

Applying this effect involves a low, constant GPU cost. If necessary, you can disable the effect by adding the disableCameraGrain option to the view’s renderOptions set. Disabling the effect is most useful for older devices, like those with an A9 processor or earlier.

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.

See Also

Disabling rendering effects