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

Use an array texture for the image atlas #799

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DJMcNab
Copy link
Member

@DJMcNab DJMcNab commented Jan 21, 2025

This has a few tradeoffs, and should probably be treated as a POC:

  1. Massively increases the number of images we can support (untested...)
  2. Simplifies atlas allocation complexity, as we don't need to restart to increase the allocation
  3. Doesn't allow any images larger than 2048x2048 to be included (currently).
    This is not a fundamental limitation
  4. Shouldn't impact compatibility, as 256 layers are supported even in downlevel_webgl2_defaults
  5. Reduces the memory efficiency of our atlases (as we just abandon partially-filled layers)
  6. The Recording level code for this is very janky. We've previously discussed wanting to significantly clean up the recording as not-fit-for-purpose.

cc @nicoburns, have you run into issues with there being too many images?

This is a potential precursor to bindless, as:

  1. Bindless can potentially contain atlas allocated (although they would then need to be non-array) textures

This has a few tradeoffs:
1) Massively increases the number of images we can support (untested...)
2) Simplifies atlas allocation code
3) Doesn't allow any images larger than 2048x2048 to be included (currently).
    This is not a fundamental limitation
4) Shouldn't impact compatibility, as 256 layers are supported even in `downlevel_webgl2_defaults`
5) Reduces the memory efficiency of our atlases (as we just abandon partially-filled layers)
@DJMcNab DJMcNab requested a review from dfrg January 21, 2025 12:13
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