Label with outline, transparency

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Bingo

Hi, I made a simple transparency shader that works fine on sprites

shader_type canvas_item;

uniform float opacity : hint_range(0, 1);

void fragment()
{
	COLOR = texture(TEXTURE, UV);
	COLOR.a *= opacity;
}

However, when trying to use it on a label, the text and outline both turn white, no matter what color I choose in the theme or in custom font color. Is there another way to make text transparent (preferably one that’s able to be animated)? Or is there a way to fix the colors with the shader?

Okay, I found out about modulate. But the outline and font have different transparencies, so they overlap, which looks pretty bad.

Bingo | 2020-10-10 11:33