Reality Composer Pro 2.0 shader graphs can't be loaded on visionOS 1

Using Reality Composer Pro 2.0, I created a simple shader graph that displays a texture on an unlit surface:

On visionOS 2 beta, I can successfully use ShaderGraphMaterial(named:from:in:) to load that shader graph material and assign it to a model entity.

However, on visionOS 1.2 and earlier, either in Simulator or on the device, ShaderGraphMaterial(named:from:in:) fails and I see the following logged to the console:

If, using Reality Composer Pro 1.0, I experimentally open the same project and delete and recreate exactly the same nodes above, then ShaderGraphMaterial(named:from:in:) works as expected on visionOS 1.2.

Is it a known issue that Reality Composer 2 can't be used with visionOS 1?

Is this intentional behavior?

I've submitted feedback as FB14828873, including a sample project and repro steps.

If possible, I would appreciate guidance from an Apple engineer, like "This is a known issue for [list of node types]" or "Reality Composer Pro 2 is not supported for visionOS 1 development, please refer to [documentation]" or "We recommend [workaround]."

Thank you.

Answered by in 800526022

Apologies for the slow reply.

Yes indeed, using any nodes that are new in RealityKit 2.0, or using a new parameter on previously-existing nodes (like "Use MaterialX V Origin") will not be loadable on a visionOS older than 2.0.

As you've likely noticed by now, RCP currently does not alert you about this fact.

After more investigation, I think one possible cause of this issue may be the "Image 2D (RealityKit)" node type, and only if the new "Use MaterialX V Origin" parameter is enabled (or enabled and later disabled). It's possible other node types or parameters are affected as well.

Apologies for the slow reply.

Yes indeed, using any nodes that are new in RealityKit 2.0, or using a new parameter on previously-existing nodes (like "Use MaterialX V Origin") will not be loadable on a visionOS older than 2.0.

As you've likely noticed by now, RCP currently does not alert you about this fact.

Thank you for responding.

Just to be clear, and to help out other visionOS developers who encounter this issue and save them time, are all of the following true? (as of Xcode 16.0 beta 5)

  • On visionOS 1.0, RealityKit's ShaderGraphMaterial(named:from:in:) (and possibly other APIs) will fail when used to load a shader graph material created using Reality Composer Pro 2.0 that references a new visionOS 2.0 shader graph node or shader graph node property that isn't supported by visionOS 1.0.

  • The error message generated by ShaderGraphMaterial(named:from:in:) is The operation couldn't be completed. (RealityFoundation.ShaderGraphMaterial.LoadError error 0.). The error does not indicate which shader graph node or shader graph node property has caused the failure.

  • To determine the specific cause of the failure, the developer must resort to time consuming techniques like a manual binary search.

  • Reality Composer Pro 2.0 doesn't display a warning if the developer creates a shader graph node that isn't supported by visionOS 1.0 or modifies the value of a new shader graph node property that isn't supported by visionOS 1.0.

  • The Reality Composer Pro shader graph documentation at https://developer.apple.com/documentation/shadergraph doesn't indicate which shader graph nodes and shader graph node properties are new visionOS 2.0 beta features that aren't supported by visionOS 1.0.

  • For third party developer projects that are required to support visionOS 1.0, Apple's recommended workaround is to avoid using Reality Composer Pro 2.0, and to use Reality Composer Pro 1.0 instead.

  • This known issue and Apple's recommended workaround are not included in the Xcode 16.0 beta 5 release notes.

Please let me know if any of that is inaccurate.

Another question: Can you please tell me if Apple is tracking these issues and plans to address them in future visionOS 2.0 betas, either with a Reality Composer Pro update, or with updated shader graph node documentation, or in the Xcode 16.0 beta release notes?

I'd be happy to submit additional feedback about each of these individually, but I am hesitant to waste any more of my time if Apple has already prioritized fixes. However, if you are able to communicate to me that Apple currently has no plans to fix any of this, then I'll submit more feedback if that would be helpful.

Thank you.

I did a test and hand-edited a USDA file to include a fictional future visionOS 3.0 shader node graph property, to see how RealityKit responds to this scenario on visionOS 2.0:

On visionOS 2.0, ShaderGraphMaterial(named:from:in:) fails with the same error that is currently returned on visionOS 1.0:

The operation couldn’t be completed. (RealityFoundation.ShaderGraphMaterial.LoadError error 1.)

(although curiously it returned error 1 that time instead of error 0)

So, it would seem that unless changes are made, we'll experience this problem again next year with Reality Composer Pro 3.0, which will blindly output shader graph nodes that can't be read by visionOS 2.0.

Hello everyone, any idea if this is possible to use this with video texture?

I have two live camera side by side and try to play live stream with depth.

thanks

For anybody else encountering this issue:

I updated to macOS Sequoia, not realizing that it doesn't support Xcode 15, which includes Reality Composer Pro 1.0.

However, it appears that it is still possible to run Reality Composer Pro 1.0 under macOS Sequoia if you launch it directly out of the Xcode 15 bundle, from Xcode.app > Contents > Applications.

Reality Composer Pro 2.0 shader graphs can't be loaded on visionOS 1
 
 
Q