Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RichTextLabel and Label shadow colors multiply the main font color instead of overriding it #31211

Open
Tracked by #39144
fossegutten opened this issue Aug 8, 2019 · 4 comments

Comments

@fossegutten
Copy link
Contributor

Godot version:
3.1.1 stable

OS/device including version:
Windows 10

Issue description:
Label and Richtextlabel shadow colors are copied from the font color and then modulated. This affects bitmap fonts, so that only full black shadows can be used. Not sure if other nodes use shadows, in that case they might suffer from the same problem. buttons do not have shadows.

The shadow colors should be a white (255, 255, 255, 255) color instead, so they can be modulated separately from the original font color.

screenshot 46

Steps to reproduce:
Add the supplied font to a label

Minimal reproduction project:
fonts.zip
Added a colored font to test with. The 'm' and 'a' characters are colored, use those to test :)

@TheDuriel
Copy link
Contributor

The shadow is managed by the font resource, not the node.

There recently were some changes to how the shadow is generated, this might help track down the relevant code #30168

@KoBeWi
Copy link
Member

KoBeWi commented Sep 22, 2020

Can anyone still reproduce this bug in Godot 3.2.3 or any later release?

Some complete reproduction project would be useful. I don't see the result from the screenshot:
image
(also not sure what exactly the issue is about)

@TheDuriel
Copy link
Contributor

I believe this was fixed ages ago by completely separating the shadow and giving it its own color.

@Calinou
Copy link
Member

Calinou commented Sep 23, 2020

I can reproduce this on 3.2.3 (Label on top, RichTextLabel at the bottom):

image

Notice how the green shadow still has a shaded "m" and colored "a".

To fix this, we should override the main font's RGB channels for the shadow texture instead of multiplying them. However, we shouldn't touch the alpha channel as to not break antialiasing.

Minimal reproduction project: bitmap-font-shadows.zip

@Calinou Calinou changed the title Richtextlabel and Label shadow colors are not absolute RichTextLabel and Label shadow colors multiply the main font color instead of overriding it Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants