Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- 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 (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-30T02:33:07.000Z (6 months ago)
- Last Synced: 2024-08-02T00:26:07.331Z (4 months ago)
- Topics: 3d-graphics, metal, objective-c-plus-plus, spatial-computing, swiftui
- Language: Objective-C++
- Homepage:
- Size: 28.5 MB
- Stars: 194
- Watchers: 4
- Forks: 19
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-visionos - Metal Rendering
- Awesome-Vision-Pro - Metal 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.
![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.