• Unity
  • Unity 2D lightning (URP) with Spine Z-Spacing setup problem

Hey.

We would like to set up Unity 2D lightning with Spine Z-Spacing.
We've read a lot of other forum posts, but we are still missing something...

We use:

  • Unity 2020.1.7
  • Spine: 4.0
  • URP: 8.2.0
  • spine.urp-shaders 4.0
  • Camera: Perspective (it looks the same on orthographic)

First, we started with shader:

Universal Render Pipeline/2D/Spine/Skeleton Lit 

and added ZWrite to it.
Here link to the shader that we use (custom Skeleton Lit Depth Write) : https://pastebin.com/u9Wkrd5J

The problem is that we would like to put a counter in between of character's hand and body.

See the image describing the problem that we have:

The problem is that the shader cuts part of the counter and shows the background.

Hopefully, you can help us with that.

Thanks!

Related Discussions
...
  • Изменено
trafcio написал

The problem is that the shader cuts part of the counter and shows the background.

If this is your only problem, it can easily be fixed by adding an alpha-clip statement which will discard fragments that are more transparent than your configured alpha threshold. If you don't discard those fully transparent fragments, you will write to the depth buffer, counting as opaque blocking geometry. Please see this posting here:
Animated Mask/Unity (HELP)

10 дней спустя

Hey Harald,

thank you for your message.
We decided to change our workflow a little bit and we are using slot separators to solve the problem when a character is in two (or more) separate layers. It was more clear to our designers.

Thanks once again.

Glad to hear you've found a suitable workflow, thanks for getting back to us!