<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ImmersiveMediaSupport",
  "identifier" : "/documentation/ImmersiveMediaSupport/ImmersivePreviewRenderer/init(device:venueDescriptor:depthPixelFormat:colorPixelFormat:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Immersive Media Support"
    ],
    "preciseIdentifier" : "s:21ImmersiveMediaSupport0A15PreviewRendererC6device15venueDescriptor16depthPixelFormat05colorjK0ACSo9MTLDevice_pSg_AA05VenueH0CSgSo08MTLPixelK0VSgAOtcfc"
  },
  "title" : "init(device:venueDescriptor:depthPixelFormat:colorPixelFormat:)"
}
-->

# init(device:venueDescriptor:depthPixelFormat:colorPixelFormat:)

Creates an immersive preview renderer.

```
@MainActor init(device: (any MTLDevice)? = nil, venueDescriptor: VenueDescriptor? = nil, depthPixelFormat: MTLPixelFormat? = nil, colorPixelFormat: MTLPixelFormat? = nil)
```

## Parameters

`device`

The `MTLDevice` to use.

`venueDescriptor`

The `VenueDescriptor` to use to render the `ImmersiveVideoFrame`.

`depthPixelFormat`

The depth pixel format to use.

`colorPixelFormat`

The pixel format of the color attachment.

## Discussion

The renderer is initialized with optional Metal device and pixel format configurations.
If you don’t provide a device, the renderer uses the system default Metal device.
You can set the venue descriptor during initialization or update it later through the [`venueDescriptor`](/documentation/ImmersiveMediaSupport/ImmersivePreviewRenderer/venueDescriptor) property.

---

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)