Metal Shading Language vs Reality Composer Pro Shader Graph vs Unity Shader Graph vs MaterialX Shader

I have a relatively complex shader in the metal shader language. Now I want to use this shader in visionOS. As I understand the straight forward approach would be to recreate the shader in the Reality Composer Pro (RCP) Shader Graph, however I do not think this is possible in my case. (Because I have an array of input variables and a while loop).

  1. Am I correct, that not all shaders from the Metal Shading language can be converted into a RCP Shader Graph?

In the WWDC video about "Create immersive Unity apps" I saw that the Shader Graph from Unity is converted into MaterialX and then into a Shader Graph Material. On the Unity documentation I found that not all Unity Shader Nodes are supported, but not if this means the Unity Shader Graph does not provide any more functionality.

  1. So is the Unity Shader Graph limited by the functionalities the Shader Graph in RCP provides?

  2. If it is not, is it possible to take advantage of that without using Unity and using a MaterialX shader directly in some way (for example with the MaterialX Graph Editor)?

Accepted Reply

Hello!

You are correct that, currently, not all of Metal's shader functionality is supported in our MaterialX ShaderGraph. Array support and looping, as you mentioned, are 2 examples of things not yet supported.

And yes indeed, Unity Shader Graph is ultimately converted to our own MaterialX ShaderGraph, and so it does not offer any extra functionality on visionOS.

Geoff

Replies

Hello!

You are correct that, currently, not all of Metal's shader functionality is supported in our MaterialX ShaderGraph. Array support and looping, as you mentioned, are 2 examples of things not yet supported.

And yes indeed, Unity Shader Graph is ultimately converted to our own MaterialX ShaderGraph, and so it does not offer any extra functionality on visionOS.

Geoff

Chiming in to say that this would be an excellent reason to support custom Metal shaders in the future to allow for easier porting of applications like this.