rffaguiar

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?
rffaguiar
  • Posts: 6

Harald

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
User avatar
Harald

Harri
  • Posts: 2091

rffaguiar

Thanks Harald!
rffaguiar
  • Posts: 6


Return to Unity