• Unity
  • URP 2D + tint black?

Related Discussions
...

Is it possible to use URP 2D + tint black option (to make a game object blink in certain circumstances) at the same time?

I ask because to make a blinkable game object we need to use the shader Skeleton Tint Black and check the box tint black (!). This works fine and I can make a game object blink on Unity during an animation.

However, if I change the shader to

  1. URP > 2D > Sprite-Lit-Default or;
  2. URP > 2D > Skeleton-Lit or;
  3. URP > 2D > Spine > Sprite/Skeleton Lit

the game object can't blink anymore.

Am I missing something or isn't possible?

Your observation is correct, the other shaders do not support the Tint Black feature (which is set via vertex data and can be controlled by animation keyframes) yet.

Actually it would make sense to support it in the more powerful shaders such as the Sprite shaders.
I have created an issue ticket here:
[unity] Support tint black at lit shaders · #1705

In the meantime if you feel capable of doing it, you could create your own copy of the desired shader and add the tint black code.
The black color gets passed in via the uv1 and uv2 vertex attributes:
spine-runtimes/Spine-Skeleton-TintBlack.shader at 3.8
spine-runtimes/Spine-Skeleton-TintBlack.shader at 3.8
Then passed from vertex to fragment shader:
spine-runtimes/Spine-Skeleton-TintBlack.shader at 3.8
And evaluated:
spine-runtimes/Spine-Skeleton-TintBlack.shader at 3.8

Thanks Harald!

3 Jahre später

@rffaguiar We have finally added support for Tint Black functionality at all Spine URP shaders (2D and 3D shaders) and at all standard pipeline Spine/Sprite shaders. This feature can be enabled via the Tint Black material parameter in the Inspector. Note: The URP Sprite shaders provided in the Spine URP Shaders extension UPM package require the latest version of the spine-unity runtime (package version 4.1.12, 2023-05-31 or newer) to display the added material parameters in the Inspector GUI.

The respective commits have been pushed to both the 4.1 and 4.2-beta branches.
New 4.1 and 4.2-beta spine-unity unitypackages and Spine URP shaders UPM packages are available for download here as usual:
https://esotericsoftware.com/spine-unity-download

Sorry that this feature has been delayed for such a long time!