AssetLoader should be extendable by chaining multiple format loaders
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## What problem does this solve or what need does it fill?
Related to #21185 and #24130
GltfLoader and CompressedImageSaver processor uses ImageLoader, which doesn't support custom image asset loader, and hdr, exr loaders.
In this case, we want a centralized image loader that contains multiple format loaders, chaining them to check file extensions or read bytes to determine if an Image can be loaded.
## What solution would you like?
This is a very rough idea:
1. AssetFormatLoader for recognizing and loading one format.
2. AssetLoader which chains multiple AssetFormatLoader and can be extended by users. If a format loader fails we try the next instead of failing to load.
Contributor guide
Research direction
Review the existing GltfLoader, CompressedImageSaver, and ImageLoader implementations, then read related issues #21185 and #24130 for context. Define how centralized image loading should recognize formats, try multiple loaders, and allow custom loaders, including hdr and exr support; done means the proposed loader covers these cases without failing after the first unsupported format.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100