Non shader graph shader not supported or MaterialX encoding missing

With the target platform set to visionOS and entering play mode, some shaders are not loaded correctly and are invisible.
Specifically, I am using the Unity Figma Bridge package to sync my Figma UI prototypes into Unity (GitHub - simonoliver/UnityFigmaBridge: Easily bring your Figma Documents, Components, Assets and Prototypes to Unity). With the target platform set to macOS, everything works as expected. When the target platform is set to visionOS however, some shaders are not loaded.

The console shows the warning: “[Diagnostics] Warning: Non shader graph shader ‘Figma/FigmaImageShader’ not supported or MaterialX encoding missing”

I have tried reimporting the PolySpatial packages, but that did not fix the issue.

If the Volume Camera is set to inactive, the Figma UI is loaded correctly, but obviously this is no solution, as I need the volume camera to be active.

As the issue only occurs with the target platform set to visionOS, I assume the issue lies somewhere in PolySpatial and not in the Unity Sigma Bridge package.
Is this a known issue and is there a fix for this available or planned?

The issue here is that PolySpatial doesn’t support ShaderLab shaders like FigmaImageShader; it only supports shader graphs, which it converts into MaterialX as part of the asset import process. The reason for this is because RealityKit, the scene graph that we target on visionOS for MR mode, only supports custom shaders via MaterialX; it doesn’t support the Metal shaders that we generate from ShaderLab (and use in VR/Metal mode).

In other words, for UnityFigmaBridge to work in PolySpatial, its shaders would have to be rewritten as shader graphs.

1 Like