
Alternatively it would be nice if quads could avoid outlines all together.
Fortunately I have a workaround in my game, as I only need 1 type of outline color (a close-but-not-actually-black-tone) and I found a fix in tinkering with the shader, checking if the vertex color is magenta (a color I'll never use) and then adjust the color. This way the fragment function can determine if it's currently drawing an outline or not (because magenta is the signal that it's an outline) and then not consider the mask.rgb and give out the authentic outline color.
if(i.color.r == 1 && i.color.b == 1 && i.color.g == 0) { col.rgb = i.color.rgb; } else { col.rgb = mask.rgb * i.color.rgb; } col.a = text.a * mask.a * i.color.a;
Would be interested if there was a better way to solve this cause it would be nice if my fix wasn't so hacky. Also my fix doesn't solve wanting e.g.: this brown outline (even though nobody ever probably wants an ugly outline like this, I just chose it to visualize the effect it has on the quad)
I wasn't able to find another topic here on the forum or anywhere else that spoke about this issue. Maybe everybody just uses black outlines and it never appeared.
EDIT: The more I thinker with it, I don't understand the choice that quads get an outline in general, it's tough to make work for using icons. Do you think there could be a way to disable that? Or is it so ingrained in the shader functionality that that's just the way it works?
EDIT2: I got another question. Would it ever be possible to make quad size independent of font size? Because I use pixel icons but I offer in the game that the player can chose different fonts, e.g.: pixel font but also HD font. Problem is, they have different sizes (font sizes) base-line, which translates to different font-sizes for the component, which then means the icon has different size because the quad size is relative. :(