First, take the following shader:
shader_type canvas_item;
uniform float whitening : hint_range(0, 1);
uniform vec4 shade_color : hint_color = vec4(1,1,1,1);
void fragment() {
vec4 texture_color = texture(TEXTURE, UV);
COLOR = vec4(mix(texture_color.rgb, shade_color.rgb, whitening), texture_color.a);
}
This shader takes an image and allows me to replace its color with a different one- often white- without modifying the transparency. This is useful for making something flash white or red when it takes damage, for example.
However, when attached to a SpineSpriteNode it disables all transparency in the animation. Take this character for example- we experimented with an "aura" around her but decided ultimately to drop it. This is her node WITHOUT the shader in place.
Here she is with the shader with ZERO whitening- which should leave no color mixing or modification to transparency.
And finally, here's what happens when you turn the whitening parameter up. She'll turn white, as expected.
This is all with the shader in the "normal material" slot. It doesn't do anything when placed in additive/multiply/screen.
I'm guessing that, since the texture HAS color and is being hidden by the animation system, the shader is wiping the alpha value away. Does the runtime have any way to expose what the display transparency is to Godot's shader language? I'd love to be able to use color modifying shaders, but it's a no go if it reveals hidden elements.
Issue is resolved- see here. Issue isn't with incompatibility, it's just that we need to pass in vertex color.