• Unity
  • Set Alpha On Spine/Skeleton Tint Shader

I am back with a followup question about the shader.

Current I am setting a color change as so:

mpb = new MaterialPropertyBlock();
Color color = new Color(0, 255, 0, 0.5f);
mpb.SetColor("_Black", color);
_meshRenderer.SetPropertyBlock(mpb);

However the alpha property is ignored. Even at 0% it shows the color change at 100%.

Can you advise me how I can set the intensity of the color change? I would like to fade in and out the color changes as opposed to having them 100% on or off.

Related Discussions
...

You need to set the normal (light) "_Color" alpha value, not the (dark) "_Black" color.

The "_Black" color alpha value is used for another purpose, you can control the additive properties of the color when the _DarkColorAlphaAdditive "Additive DarkColor.A" property is enabled.

Can you clarify this point?

you can control the additive properties of the color when the _DarkColorAlphaAdditive "Additive DarkColor.A" property is enabled.

For the first part are you saying that I set the color change to "DarkColorAlphaAdditive " instead of "Black" like so:

        
mpb.SetColor("_DarkColorAlphaAdditive ", red);

As for the "Additive DarkColor.A" enabling, can you clarify how I do that with a MaterialPropertyBlock or is there some other way to do this?

Aggressor :

For the first part are you saying that I set the color change to "DarkColorAlphaAdditive " instead of "Black" like so:

No, I meant that you should not be changing the "_Black" alpha value.
Please set the "_Color" alpha value instead.