Skip to content

vello_gpu: Do not use bicubic sampling for bitmap glyphs - #1970

Open
LaurenzV wants to merge 2 commits into
mainfrom
laurenz/text-bilinear-always
Open

LaurenzV wants to merge 2 commits into
mainfrom
laurenz/text-bilinear-always

Conversation

@LaurenzV

@LaurenzV LaurenzV commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

We are trying to move away from bicubic sampling, both because it's very slow since it doesn't have native GPU support, and because it also makes the shaders very big. We will likely still offer the option for people to choose it if desired, but at least internally, I think we should avoid using it.

Therefore, I would propose always using Medium image quality when rendering bitmap glyphs. The original idea behind choosing bicubic was that it can make aliasing artifacts slightly better when downscaling a lot since we sample more surrounding pixels. However, it doesn't fix the fundamental issue: If you downscale a bitmap glyph by 6x, you are still going to get aliasing artifacts, they are just a slightly less worse, which is also noticeable if you look at some of the test images. The real solution to this problem is 1) Choose appropriate bitmap strikes (which we already do when possible and 2) apply mipmapping, which we currently can't.

The reason this came up is that I'm working on feature-flagging bicubic sampling in the shader, and it would be nice if this wouldn't break glyph rendering.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Since glyphs don't use bicubic anymore this test didn't test what it was supposed to test, hence why I replaced it with a new test, which exposes the same issue as #1563.

@LaurenzV
LaurenzV requested a review from grebmeg October 1, 2026 12:50

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant