• Unity
  • Shader for showing the sprite shadow when behind wall

  • تم التحرير
Related Discussions
...

Hi there, first of all, thank you so much for this awesome asset.

We have been developing our game and using Spine animation for a while, and we are wondering if maybe you can help us with the following issue, as it should be a pretty common problem, though, I wasn't able to find it by using a search as I don't know the exact terminology.

Example:

We are looking for a shader that will work with Spine Mesh Renderer. Note that we use an additional camera and Raw Image to display the MeshRenderer in the UI.

We want that when this RawImage is behind other Images in the UI hierarchy, it's still visible through them, but the covered part should be colored differently, even a single color silhouette would work fine.

I hope someone can help with some suggestions. Thanks in advance!

Thanks for your kind words, glad you like using Spine!

Basically you can use any thirdparty shader with Spine components, as SkeletonAnimation uses a normal MeshRenderer. It's just that you will likely need to switch to straight alpha workflow then instead of premultiplied-alpha (PMA) workflow. Then you need to enable some settings at the SkeletonAnimation component as described here, so that e.g. vertex colors and normals are generated properly:
spine-unity Runtime Documentation: Writing your own shaders

Do you already have a working shader or post-processing setup for other non-Spine parts that you would like to use? Since there are multiple ways to achieve such a see-through effect, the integration with Spine skeletons will depend on the solution used.