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 subpixel layouts in text rendering #81438

Merged
merged 1 commit into from
Nov 10, 2023
Merged

Conversation

0xafbf
Copy link
Contributor

@0xafbf 0xafbf commented Sep 8, 2023

The RGB subpixel layout configuration was actually doing subpixel rendering for the BGR layout.

@0xafbf 0xafbf requested a review from a team as a code owner September 8, 2023 01:29
@YuriSizov
Copy link
Contributor

@0xafbf Sorry for not getting back earlier. Could you demonstrate the difference? It looks like a typo, but it's hard to say if the output looks as expected or not with or without these changes.

@YuriSizov YuriSizov modified the milestones: 4.2, 4.x Nov 10, 2023
@0xafbf
Copy link
Contributor Author

0xafbf commented Nov 10, 2023

In the screenshot you share, look how the red subpixel gets lit when the blue one should be lit, and it is unlit when the blue one should be unlit
image
That screenshot doesn't seem to use a uniform rgb layout though, give me a second and I'll post another picture.

@bruvzg
Copy link
Member

bruvzg commented Nov 10, 2023

In the screenshot you share, look how the red subpixel gets lit when the blue one should be lit, and it is unlit when the blue one should be unlit

Yes, you are probably right, and tint is likely chromatic aberration from the lens. After looking at a different angle and closer distance (can take a photo in this position) it looks more correct with the changed order.

Edit: rendering with the filliped order also matches sample RGB subpixel AA images.

@YuriSizov YuriSizov modified the milestones: 4.x, 4.2 Nov 10, 2023
@0xafbf
Copy link
Contributor Author

0xafbf commented Nov 10, 2023

I already had the picture when I saw you already commented. I'm posting it for reference. Left is previous, right is with PR fix:
Untitled

Picture quality is not the greatest, because I was taking photo from microscope screen. The change is the most noticeable with text with lines of a single pixel width.

@akien-mga akien-mga merged commit 61b62fc into godotengine:master Nov 10, 2023
@akien-mga
Copy link
Member

Thanks!

@0xafbf 0xafbf deleted the patch-2 branch August 16, 2024 01:48
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.

5 participants