One Logo Pool Ball
_RealityKit_SwiftUI · IOS API REFERENCE

RealityViewRenderingEffects

struct · iOS 18.0+ · SDK 27.1

struct RealityViewRenderingEffects

A struct for enabling and disabling rendering effects for RealityKit content.

Members (12)

get · iOS 18.0+

motionBlur

TypeScript
get motionBlur(): RealityViewRenderingEffectMode
Swift declaration
var motionBlur: RealityViewRenderingEffectMode

Enables or disables a motion blur effect for virtual content. A video stream consists of a sequence of images. Each image in the sequence represents a short, but non-zero period of time. Fast-moving, real-world objects captured within a frame can experience a visual smearing, known as _motion blur_. By default, RealityKit applies an effect that introduces motion blur for virtual objects that appear in the scene. The effect takes into account the relative motion of the camera and the virtual object. If the motion blur effect is disabled by setting the `motionBlur` property to `.disabled`, virtual objects will be rendered at exactly one position in the frame for any given image in the image sequence. Disabling motion blur reduces the computational cost of rendering. When deciding whether to use any effect, be sure to consider your app’s CPU and GPU utilization, as described in <doc:improving-the-performance-of-a-realitykit-app>. - Important: This rendering effect is unavailable on macOS.

set · iOS 18.0+

motionBlur

TypeScript
set motionBlur(value: RealityViewRenderingEffectMode)
Swift declaration
var motionBlur: RealityViewRenderingEffectMode

Enables or disables a motion blur effect for virtual content. A video stream consists of a sequence of images. Each image in the sequence represents a short, but non-zero period of time. Fast-moving, real-world objects captured within a frame can experience a visual smearing, known as _motion blur_. By default, RealityKit applies an effect that introduces motion blur for virtual objects that appear in the scene. The effect takes into account the relative motion of the camera and the virtual object. If the motion blur effect is disabled by setting the `motionBlur` property to `.disabled`, virtual objects will be rendered at exactly one position in the frame for any given image in the image sequence. Disabling motion blur reduces the computational cost of rendering. When deciding whether to use any effect, be sure to consider your app’s CPU and GPU utilization, as described in <doc:improving-the-performance-of-a-realitykit-app>. - Important: This rendering effect is unavailable on macOS.

get · iOS 18.0+

cameraGrain

TypeScript
get cameraGrain(): RealityViewRenderingEffectMode
Swift declaration
var cameraGrain: RealityViewRenderingEffectMode

Enables or disables an image noise effect for virtual content. 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 ``RealityViewCameraContent/renderingEffects``. When deciding whether to use any effect, be sure to consider your app’s CPU and GPU utilization, as described in <doc:improving-the-performance-of-a-realitykit-app>. - Important: This rendering effect is unavailable on macOS.

set · iOS 18.0+

cameraGrain

TypeScript
set cameraGrain(value: RealityViewRenderingEffectMode)
Swift declaration
var cameraGrain: RealityViewRenderingEffectMode

Enables or disables an image noise effect for virtual content. 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 ``RealityViewCameraContent/renderingEffects``. When deciding whether to use any effect, be sure to consider your app’s CPU and GPU utilization, as described in <doc:improving-the-performance-of-a-realitykit-app>. - Important: This rendering effect is unavailable on macOS.

get · iOS 18.0+

antialiasing

TypeScript
get antialiasing(): _RealityFoundation_AntialiasingMode
Swift declaration
var antialiasing: AntialiasingMode

Enables or disables an antialiasing effect which smooths the edges of virtual content.

set · iOS 18.0+

antialiasing

TypeScript
set antialiasing(value: _RealityFoundation_AntialiasingMode)
Swift declaration
var antialiasing: AntialiasingMode

Enables or disables an antialiasing effect which smooths the edges of virtual content.

get · iOS 18.0+

depthOfField

TypeScript
get depthOfField(): RealityViewRenderingEffectMode
Swift declaration
var depthOfField: RealityViewRenderingEffectMode

Enables or disables a depth of field effect for virtual content. 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 three dimensional sphere — in its field of view at three different distances from the camera. The closest and furtherest spheres are are in regions that are out of focus, while the middle sphere is in a region, with a width that represents the depth of field, that is in focus.](ARView-RenderOptions-swift-struct-disableDepthOfField-1) 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, ``RealityView`` does not apply depth of field by default. To enable depth of field, set the `depthOfField` property of the view's ``RealityViewCameraContent/renderingEffects``. If you do enable depth of field, be sure to check your app’s performance, as described in <doc:improving-the-performance-of-a-realitykit-app>. - Important: This rendering effect is unavailable on macOS.

set · iOS 18.0+

depthOfField

TypeScript
set depthOfField(value: RealityViewRenderingEffectMode)
Swift declaration
var depthOfField: RealityViewRenderingEffectMode

Enables or disables a depth of field effect for virtual content. 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 three dimensional sphere — in its field of view at three different distances from the camera. The closest and furtherest spheres are are in regions that are out of focus, while the middle sphere is in a region, with a width that represents the depth of field, that is in focus.](ARView-RenderOptions-swift-struct-disableDepthOfField-1) 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, ``RealityView`` does not apply depth of field by default. To enable depth of field, set the `depthOfField` property of the view's ``RealityViewCameraContent/renderingEffects``. If you do enable depth of field, be sure to check your app’s performance, as described in <doc:improving-the-performance-of-a-realitykit-app>. - Important: This rendering effect is unavailable on macOS.

get · iOS 18.0+

dynamicRange

TypeScript
get dynamicRange(): RealityViewDynamicRange
Swift declaration
var dynamicRange: RealityViewDynamicRange

Enables or disables high dynamic range rendering for virtual content. RealityKit applies a high dynamic range effect, along with tone mapping, as a post-processing step in the GPU during the render. This effect is computationally inexpensive, but you can add the ``ARView/RenderOptions-swift.struct/disableHDR`` option to the view’s ``ARView/renderOptions-swift.property`` set to turn the effect off, if needed. When deciding whether to use any effect, be sure to consider your app’s CPU and GPU utilization, as described in <doc:improving-the-performance-of-a-realitykit-app>. - Important: This rendering effect is unavailable on macOS.

set · iOS 18.0+

dynamicRange

TypeScript
set dynamicRange(value: RealityViewDynamicRange)
Swift declaration
var dynamicRange: RealityViewDynamicRange

Enables or disables high dynamic range rendering for virtual content. RealityKit applies a high dynamic range effect, along with tone mapping, as a post-processing step in the GPU during the render. This effect is computationally inexpensive, but you can add the ``ARView/RenderOptions-swift.struct/disableHDR`` option to the view’s ``ARView/renderOptions-swift.property`` set to turn the effect off, if needed. When deciding whether to use any effect, be sure to consider your app’s CPU and GPU utilization, as described in <doc:improving-the-performance-of-a-realitykit-app>. - Important: This rendering effect is unavailable on macOS.

get · iOS 26.0+

customPostProcessing

TypeScript
get customPostProcessing(): RealityViewPostProcessEffect
Swift declaration
var customPostProcessing: RealityViewPostProcessEffect
set · iOS 26.0+

customPostProcessing

TypeScript
set customPostProcessing(value: RealityViewPostProcessEffect)
Swift declaration
var customPostProcessing: RealityViewPostProcessEffect

Skipped declarations

No declarations were skipped in this snapshot.

All _RealityKit_SwiftUI types →