-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
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:
- Finally remove
sphericalEnvMapas it's broken/incorrect for >3 years (Remove sphericalEnvMap #4747, deprecation in Unify envmap textures and deprecate sphericalEnvMap #5454 ) - Remove iOS 10 specific HLS workaround, as it now causes new issues (iOS 12.2 video HLS Wrong Color / Occasional black screen #4134, Remove iOS 10 specific HLS workaround #5450)
- Unify
updateMapMaterialFromData,updateMapandupdateDistortionMap(Unify texture loading and map property fixes #5453) - Unify
envMaploading in bothphong.jsandstandard.jsand let it re-use texture cache (Unify envmap textures and deprecate sphericalEnvMap #5454 ) - Cache
Sourceinstead ofTextures(Cache Source instead of Texture instances in material system #5455 )