ShaderGraphMaterial with Occlusion Surface Output fails to load on iOS and macOS

A ShaderGraphMaterial with an Occlusion Surface Output generated with RealityComposer 2 fails to load on iOS 18 and macOS 15 with the following error: RealityFoundation.ShaderGraphMaterial.LoadError.invalidTypeFound (https://developer.apple.com/documentation/realitykit/shadergraphmaterial/loaderror/invalidtypefound)

This happens with both https://developer.apple.com/documentation/shadergraph/realitykit/occlusion-surface-(realitykit) and https://developer.apple.com/documentation/shadergraph/realitykit/shadow-receiving-occlusion-surface-(realitykit)

RealityView { content in
    do {
        let bgEntity = ModelEntity(mesh: .generateCone(height: 0.5, radius: 0.1), materials: [SimpleMaterial(color: .red, isMetallic: true)])
        bgEntity.position.z = -0.2
        content.add(bgEntity)
        
        let occlusionMaterial = try await ShaderGraphMaterial(named: "/Root/OcclusionMaterial", from: "OcclusionMaterial")
        let testEntity = ModelEntity(mesh: .generateSphere(radius: 0.4), materials: [occlusionMaterial])
        content.add(testEntity)
        
        content.cameraTarget = testEntity
    } catch {
        print("Shader Graph Load Error:")
        dump(error)
    }
}
.realityViewCameraControls(.orbit)
.edgesIgnoringSafeArea(.all)

Feedback ID: FB15081296

ShaderGraphMaterial with Occlusion Surface Output fails to load on iOS and macOS
 
 
Q