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

Refactor texture caching to share Sources between Textures #5449

Closed
5 tasks done
mrxz opened this issue Feb 6, 2024 · 1 comment
Closed
5 tasks done

Refactor texture caching to share Sources between Textures #5449

mrxz opened this issue Feb 6, 2024 · 1 comment

Comments

@mrxz
Copy link
Contributor

mrxz commented Feb 6, 2024

Description:
A-Frame currently caches Textures in order to prevent duplicate uploads. The cache takes both the source (e.g. url) and some texture properties into account. However it fails to correctly handle cases where these properties change after the fact. See #5441, #1372, #5120.

I started on refactoring parts of the texture handling to cache Source instead. Three.js can gracefully handle only uploading textures as needed when sharing one Source between multiple Texture instances. The changeset for this is becoming quite large, so it's probably best to split it up in several smaller PRs. What doesn't help is that there are places that sidestep the centralized texture handling, so I'll try to unify code-paths first.

This issue is to track progress:

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