For (1), consider using an on-demand resource.
https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/On_Demand_Resources_Guide/index.html
.
Post
Replies
Boosts
Views
Activity
The above Shader Graph from @mayoff works fine for me, using known good stereo image pairs. However, the preview on the Mac shows only a black material. You can only see the stereo output on actual hardware.
I the shader and named it TestStereo. Then I created a Cube in RCP, and changed the material from DefaultMaterial to TestStereo. When I did this, the cube became not quite opaque (I could now faintly see the grid through the cube). When I preview the scene on an actual Vision Pro, it looks great. Well, the stereo image part looks great, but I now have the image shown on all 6 faces of the cube. So I'll experiment with adding a billboard component (as seen in the SwiftSplash sample game, and build a simple Scene that I can drive with arbitrary left/right images.
I haven't seen this Shader Graph reference until today. I think it might be fairly new. Reference doc for every shader, examples for many of them.
https://developer.apple.com/documentation/shadergraph
I just hit the same problem/error, with RealityView and a Reality Composer Pro scene driven by a Shader Graph Node. This line was working sometimes, not working others:
let newTexture = try TextureResource.load(named: newValue)
It turns out it was failing on 1024x1024 PNGs that were all grayscale. Adding a tiny red line on each one cured it (done in Preview.app, color model of the PNG is still "Gray").
Xcode 15.3, reproducible on Simulator and on Vision Pro running visionOS 1.2.
Feedback FB13733823.
You might find this (my) sample code helpful. I was wondering the same thing, and wrote a test app. It's very simple, and does only one thing.
https://github.com/halmueller/ShaderGraphControls
.
Thinking about this some more...I can control horizontal disparity with a slider, specifically using it to control the horizontal centers of the right/left images. The only remaining piece is the baseline length, but that's fixed on Vision Pro so not really worth tinkering with in the spatial image.
I don't think you're going to find that data in a public API from Apple. You'll have to go a third party or open source route. Mapbox might be a workable solution: https://docs.mapbox.com/ios/maps/examples/building-extrusions/