Skip to content

Refactor texture caching to share Sources between Textures #5449

@mrxz

Description

@mrxz

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions