• RuntimesUnity
  • Spine character disappears with certain Shader Graph materials

I'm applying a Shader Graph-based material to Spine characters in Unity.
The player and enemy both use exactly the same material and Shader Graph setup.

However, when applying an Unlit Lit (or regular Lit) shader to the enemy character, it becomes completely transparent. It only displays correctly with Sprite Unlit Lit.

Additionally, when I try to animate any property of the material via the Mesh Renderer > Material > Surface Input in the Animation window, the enemy instantly becomes invisible and does not recover until I remove the property track entirely.
The player character does not have this problem and works perfectly with the same setup.

Is there a known reason for this behavior with Spine characters? Are there any gotchas when using Shader Graph with Skeletons?

Thanks in advance!

Related Discussions
...

When using Shader Graph with Spine characters, there are a few considerations to keep in mind. Spine shaders typically require specific settings, such as disabling backface culling and using Premultiply Alpha (PMA) textures. If your Shader Graph material does not account for these, it might cause issues like transparency or invisibility. Additionally, Spine shaders often don't require normals or tangents, so enabling these might affect the rendering. It's also important to ensure that the blend mode is set correctly, especially if using PMA textures. If your Shader Graph material is not set up to handle these requirements, it could lead to the issues you're experiencing. You might want to check if the Shader Graph material is compatible with the Spine setup and adjust the settings accordingly.

  • Vein ответили на это сообщение.
  • Vein оценил это.

    Spinebot
    Thanks for the explanation!
    I changed the Render Face setting to Back (or Both), and it fixed the issue — the character is now rendering correctly.
    It might have happened because the character was flipped horizontally (negative X scale) in Spine Editor. That could be why it only rendered properly from the back face.

    Appreciate the help!

    @Vein Glad to hear you've figured it out, thanks for sharing!