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: 20 days ago
JSON representation
A minimal example of rendering an immersive spatial experience with Metal, ARKit, and visionOS Compositing Services
- Host: GitHub
- URL: https://github.com/metal-by-example/metal-spatial-rendering
- Owner: metal-by-example
- License: unlicense
- Created: 2023-06-22T21:42:57.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-30T02:33:07.000Z (10 months ago)
- Last Synced: 2024-11-01T02:35:24.355Z (6 months ago)
- Topics: 3d-graphics, metal, objective-c-plus-plus, spatial-computing, swiftui
- Language: Objective-C++
- Homepage:
- Size: 28.5 MB
- Stars: 201
- Watchers: 4
- Forks: 20
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-visionos - Metal Rendering
- Awesome-Vision-Pro - Metal Rendering
- awesome-visionOS - metal-spatial-rendering
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.

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.