Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/metal-by-example/metal-spatial-rendering

A minimal example of rendering an immersive spatial experience with Metal, ARKit, and visionOS Compositing Services
https://github.com/metal-by-example/metal-spatial-rendering

3d-graphics metal objective-c-plus-plus spatial-computing swiftui

Last synced: about 1 month ago
JSON representation

A minimal example of rendering an immersive spatial experience with Metal, ARKit, and visionOS Compositing Services

Awesome Lists containing this project

README

        

# Immersive Spatial Rendering with Metal in visionOS

This sample is a minimal example of rendering a immersive spatial experience with Metal, ARKit, and visionOS Compositing Services.

![Example screenshot of spatial rendering](screenshots/01.png)

When running on the Simulator, the app uses the [`.dedicated`](https://developer.apple.com/documentation/compositorservices/layerrenderer/layout/dedicated) layout. When running on an Apple Vision Pro, the app uses the [`.layered`](https://developer.apple.com/documentation/compositorservices/layerrenderer/layout/layered) layout along with [Metal vertex amplification](https://developer.apple.com/documentation/metal/render_passes/improving_rendering_performance_with_vertex_amplification) to efficiently render both stereo views in a single pass.

When running on a visionOS 2 simulator or device, the app enables the [mixed immersion style](https://developer.apple.com/documentation/swiftui/immersionstyle/mixed) and enables the user to progressively select how much of the real world is visible via passthrough.