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

Feature Request: overflow atlas into new atlases #20

Open
mrhelmut opened this issue Jul 6, 2021 · 1 comment
Open

Feature Request: overflow atlas into new atlases #20

mrhelmut opened this issue Jul 6, 2021 · 1 comment

Comments

@mrhelmut
Copy link

mrhelmut commented Jul 6, 2021

Hello there,

I would like to suggest a new feature to atlas generation.

It seems to be pretty common to pack a font across several textures whenever the glyphs can't fit into the desired texture size.

This is especially useful in contexts like mobile gaming and huge character sets where glyphs may overflow a single 2048x2048 atlas.

Cheers! Thanks for the relevant work in distance fields generation!

@Journeyman1337
Copy link

Journeyman1337 commented Apr 3, 2022

Several textures of the same width and height can easily be sent to GPU as a texture array. For example, GL_TEXTURE_2D_ARRAY in OpenGL This allows for multiple texture pages, giving much more space for glyphs than a typical texture can support.

I wrote a bin packing algorithm that can optimally place rects on multiple pages:
https://gist.github.com/Journeyman-dev/d518e94961a77325c1ad8c9a56f519cd

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

No branches or pull requests

2 participants