Hey everyone!

Guess what? I got lucky and landed a spot in the beta for Apple's fresh-out-of-the-oven VisionOS. But, man, they're super picky about using only shader graph nodes. 🙄

I've been digging deep into this, but I'm hitting a wall. Anyone got some shader graph shaders for spine they can share? Would really help me on this crazy journey!

Thanks a bunch! 🙌

Related Discussions
...

So... I have spine animation playing on visionOS. I put together a simple shader graph shader and am rendering the spine animation on a mesh plane with the shader. Yay.. Getting closer....

The issue I am running into now is handling the alpha/transparency on the spine atlas. In unity, everything is looking good but once Im on visionOS, the transparency/cutout is not being rendered..

I am not sure if this is related to visionOS rendering compatibility or if there is something Ive missed with a setting in spine.

Ive attached what I am seeing in unity, in vision os, and the actual shader graph. If something stands out to you, any help would be appreciated!

Thanks!
VisionOS:

Unity:

ShaderGraph:

Alright, for anyone that sees this in the future when developing on visionOS I have found a solution that worked for our needs.

Here are my notes:

-The spine asset is set up to use the SkeletonAnimation component, I was unable to get spine to work with the SpineGraphic component.
-When adjusting the Spine component material in the inspector, it auto-switches during LateUpdate() if the material being set is not a Spine skeletal shader. The solution was to modify the material directly on the spine atlas data SO to maintain the custom shader.
-The spine animation/asset is being rendered on a mesh plane.
-The shader driving the spine assets is built in shader graph as only shader graph is supported on visionOS. There was some tweaking that needed to be done to support transparency. I resolved this by: Selecting the lit shader and updating the Graph Inspector Graph settings -> Surface Type: Transparent and Blending Mode: Alpha.

There may be some inconsistencies and possibly a easier way to do this but with my limited knowledge of spine and shader graph this is what worked for me!

Cheers!

    Glad to hear you've figured it out. Thanks very much for getting back to us and for sharing your insights.

    dev90 -When adjusting the Spine component material in the inspector, it auto-switches during LateUpdate() if the material being set is not a Spine skeletal shader. The solution was to modify the material directly on the spine atlas data SO to maintain the custom shader.

    This is not exactly true, the Material is not overridden because it is using a non-Spine shader but because materials are assigned according to the active attachments each frame. Especially when having multiple atlas pages, your attachment draw order dictates which materials are assigned at each submesh. The spine-unity documentation explains that here:
    https://esotericsoftware.com/spine-unity#Materials

    Please note that the following documentation sections are also highly relevant in case you want to write custom shaders or use Shader Graph:
    https://esotericsoftware.com/spine-unity#Shader-Graph
    https://esotericsoftware.com/spine-unity#Writing-your-own-shaders
    And the general Shaders section here:
    https://esotericsoftware.com/spine-unity#Shaders

    dev90 -The spine animation/asset is being rendered on a mesh plane.

    This is not exactly correct either, it is not necessarily flat and not Unity's "plane" grid mesh. You can see the mesh in the Scene View when changing the display mode to e.g. Shaded Wireframe. The skeleton is rendered similar to a 3D model using a MeshRenderer, where the triangle mesh is populated according to the attachment types with quads for normal region-attachments or the mesh vertices you defined when using mesh-attachments. The Z spacing can be configured in the Inspector setting Advanced - Z Spacing, draw order dictates the Z-ordering of the attachments.

    Thanks for getting back to me Harold, I figured I was off on some aspects.

    Unfortunately, VisionOS only supports ShaderGraph, which also has its limitations. Its been quite a challenging deep dive but I feel like Im getting closer to coming up for air.

    Interesting, I do see now that the initial quad/plane I set up had its mesh switched out with the SkeletonMesh. That makes a lot more sense now.

    Ill take these notes with me into the future as I continue to support apples VisionOS and spine.

    Appreciate the help and take care.

    All the best for your project. If you encounter any issues down the road, feel free to ask.