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

Label3D with MSDF has aliasing #102180

Closed
celyk opened this issue Jan 30, 2025 · 7 comments · Fixed by #102208
Closed

Label3D with MSDF has aliasing #102180

celyk opened this issue Jan 30, 2025 · 7 comments · Fixed by #102208

Comments

@celyk
Copy link

celyk commented Jan 30, 2025

Tested versions

Reproducible in v4.4.beta1.official [d33da79]
Not reproducible in v4.3.stable.official [77dcf97]

System information

Godot v4.4.beta1 - Linux Mint 21.3 (Virginia) on X11 - X11 display driver, Single-window, 1 monitor - Vulkan (Forward+) - integrated Intel(R) Xe Graphics (TGL GT2) - 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (8 threads)

Issue description

Label3D shows jagged edges when it's meant to be smooth in this mode, like it does in a regular Label.

Image

I assume that MSDF is based on this old Valve paper
https://steamcdn-a.akamaihd.net/apps/valve/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf

Look for the part about anti-aliasing. It's basically free so there's no reason not to do it.

Steps to reproduce

  1. Create Label3D with some text
  2. Enable gui/theme/default_font_multichannel_signed_distance_field in the project settings or use a font with MSDF enabled on import
  3. Observe jaggies

Minimal reproduction project (MRP)

N/A

@AThousandShips
Copy link
Member

Can confirm, and can confirm it works correctly in 4.3, will bisect

@AThousandShips
Copy link
Member

This seems like a regression from #100678 which was added to solve #100280, prior to that shaders wouldn't compile with this enabled (but worked correctly prior to #100280)

CC @clayjohn

@clayjohn
Copy link
Member

This must be a regression from #100280. All #100678 was make the shader compile again. It didn't change any behaviour

@AThousandShips
Copy link
Member

AThousandShips commented Jan 30, 2025

Neither should touch any relevant code though, unless it's caused by the change in the operation making the scale wrong somehow, #100280 just changed the denominator, something between might have caused it as well while the compilation was broken

CC @Calinou

@clayjohn
Copy link
Member

I've got a fix on the way already

@AThousandShips
Copy link
Member

Was it related to albedo_texture_size not being assigned in Label3D?

@clayjohn
Copy link
Member

Was it related to albedo_texture_size not being assigned in Label3D?

Yep!

@clayjohn clayjohn moved this from For team assessment to Fix pending review in Rendering Issue Triage Jan 30, 2025
@github-project-automation github-project-automation bot moved this from Fix pending review to Done in Rendering Issue Triage Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Very Bad
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants