Wireframe shader issue

On device the application crashes when loading an object with the Wireframe material and VR/SpatialMapping/Wireframe shader. Works as expected in the simulator in Unity but will crash every time on device. Other materials / shaders do not cause an issue and it seems to be related to the geometric computation going on in the shader.

It worked on the previous SDK we were using (SDK 0.53.1) both in the simulator in Unity and on device. Any help is much appreciated.

Unity Editor version: 2022.2.0b12
ML2 OS version: B3E.220818.12-R.046-R.420 (user)
MLSDK version: 1.0.0
Host OS: Windows

1 Like

I've had the same issue, and it SEEMED that it would only do it when I had Magic Leap's new spatial mapping wireframe in the scene with it. I say 'seemed' because I did add it to scenes that didn't use ML's wireframe, and it worked.


@dhartley Thank you for your post. I'll talk to our engineers and report back here asap.

1 Like

@dhartley Can you please try updating to the latest releases in the Magic Leap Hub and let us know if this is still an issue? Thanks very much.

1 Like

Hi @dhartley, we've released MLSDK 1.1.0. and Unity Package 1.3.0. Please try updating and let us know if this is still an issue. Thanks very much.

1 Like

This is still an issue in with the newest MLSDK. I am working with the following versions

Unity: 2022.2.7f1
MLSDK: 1.4.0
MRTK: 2.8.3
URP: 14.0.6

I tested two scenarios.

  • The first one: sphere with material whose shader was "Universal Render Pipeline/VR/SpatialMapping/Wireframe
  • The second one: Sphere with a material whose shades was "Mixed Reality Toolkit/Wireframe"

I use the trigger to enable the sphere. As soon as I enable the sphere other gameobject stop rendering but the app still running. I enable a development build to see the log while the app is running and I did not see any error message so I do not why wireframe material is still not working with the newest SDK's releases. Any help would be appreciate it.

I haven't tried it with the latest MLSDK but I have gotten it to work with shader the Magic Leap uses in their Meshing example "Shader Graphs/Textures/TexturedWireframeGraph" and using their script "MeshTexturedWireframeAdapter" to get the shader to produce the correct result. Using these examples as a base we have been able to get the meshing to work well within our application. The Meshing example scene is included in the Unity Examples package under the Unity packages in the Magic Leap Hub Package Manager.

Hope this helps!