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

Fix that transparent text still draws a text shadow #13649

Merged
merged 4 commits into from Jul 17, 2023

Conversation

grorp
Copy link
Member

@grorp grorp commented Jul 8, 2023

Currently, text shadows don't respect the alpha value of text. This is a problem for status text messages, which are faded out by changing their alpha value. This video shows the incorrect "out-fading" before this PR:

incorrect.fading.before.this.PR.2.mp4

Notice that the text fades to grey (the color of the text shadow) and then just disappears.

This PR changes the rendering of text shadows so that the alpha value of the text shadow is multiplied by the alpha value of the text itself. This results in correct "out-fading":

correct.fading.after.this.PR.2.mp4

(The second video is outdated, it was taken before bf1e6a3.)

Notice that the text fades out until it is fully transparent.

To do

This PR is a Ready for Review.

How to test

Trigger some status text messages. Verify that they fade out until they are fully transparent.

Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works

Copy link
Member

@srifqi srifqi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix works as described. The implementation looks good, too.

@SmallJoker SmallJoker merged commit 3552537 into minetest:master Jul 17, 2023
13 checks passed
Wuzzy2 pushed a commit to Wuzzy2/minetest that referenced this pull request Jul 31, 2023
Makes fade out animations of text more pleasant to look at.
@grorp grorp deleted the font-alpha-fix branch December 18, 2023 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants