<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ARView/RenderOptions-swift.struct/disableDepthOfField",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:10RealityKit6ARViewC13RenderOptionsV19disableDepthOfFieldAEvpZ"
  },
  "title" : "disableDepthOfField"
}
-->

# disableDepthOfField

Disable the depth of field effect for all virtual content.

```
static let disableDepthOfField: ARView.RenderOptions
```

## Discussion

When you set the focal point of a camera, you actually choose a
range of focus rather than a point. Objects outside the range —
either too close or too far away — appear out of focus, while
objects inside the range appear in focus. The size of the range,
known as the depth of field, depends on characteristics of the lens,
the focal point, and other factors.

![An illustration of a camera with three virtual objects — each a](images/com.apple.RealityKit/ARView-RenderOptions-swift-struct-disableDepthOfField-1@2x.png)

If you place a virtual object outside of the range of focus, it can
appear detached from the scene in which it appears unless you blur
the object to match its surroundings. In many cases, the depth of
field is large enough that this doesn’t matter. But if it does
matter for your app, you can enable a post-processing effect that
blurs virtual objects to account for depth of field.

|Without depth of field                                                                                                                                                                                     |With depth of field                                                                                                                                                                                                                                                           |
|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|![A screenshot of a scene with blue and red spheres of varying distance. The scene has no depth of field, so all objects appear in focus.](ARView-RenderOptions-swift-struct-disableDepthOfField-2-without)|![A screenshot of a scene with blue and red spheres of varying distance. The scene has depth field, so the sphere in the middle appears in focus, while the closer and further spheres appear slightly blurred.](ARView-RenderOptions-swift-struct-disableDepthOfField-2-with)|

Because of its computational cost, the system disables depth of
field by default when you create a new [`ARView`](/documentation/RealityKit/ARView) instance. To
enable depth of field, remove the
[`disableDepthOfField`](/documentation/RealityKit/ARView/RenderOptions-swift.struct/disableDepthOfField) option
from the [`renderOptions`](/documentation/RealityKit/ARView/renderOptions-swift.property) set. If you do
enable depth of field, be sure to check your app’s performance, as
described in [Improving the Performance of a RealityKit App](/documentation/RealityKit/improving-the-performance-of-a-realitykit-app).

---

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)