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

Support multiple texture atlas pages #4244

merged 29 commits into from Oct 31, 2022


Copy link

@Tyriar Tyriar commented Oct 30, 2022

This adds support for multiple texture atlas pages.


  • The number of pages supported is 8 (min webgl) to gl.MAX_TEXTURE_IMAGE_UNITS (which is 16 on my machine)
  • The pages use the following strategy currently:
    • Pages start at 512x512px
    • On the 5th page it increases to 1024x1024px
    • On the 8th page it increases to 2048x2048px
  • The page strategy will be refined in Once 4 texture atlas pages are filled, queue idle tasks to merge them into a single larger texture #4243, ideally only 512x512px pages would be uploaded multiple times.
  • Uniforms are now only set when changed
  • Glyphs should show as red rectangles If something unexpected goes wrong
  • There's a new CJK test button in the demo
  • The threshold for padding allowed on a atlas row is significantly reduced as the amount of possible rows increased drastically. This will result in tighter packed atlas pages.

Fixes #4061

Screenshot of it in action:


@Tyriar Tyriar added this to the 5.1.0 milestone Oct 30, 2022
@Tyriar Tyriar self-assigned this Oct 30, 2022
@Tyriar Tyriar marked this pull request as ready for review October 31, 2022 01:11
@Tyriar Tyriar merged commit 02fa38c into xtermjs:master Oct 31, 2022
8 checks passed
@Tyriar Tyriar deleted the multi_page_atlas branch October 31, 2022 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Support multiple textures in webgl and canvas renderer
1 participant