Image's texture view should be a separate asset
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
Currently Image/GpuImage contains one texture created from image data, and one texture view created with texture view descriptor, therefore you have to clone the Image to create new `Handle`s to use different texture views, such as using different srgb format or view dimension, using a 2d slice from texture array or mipmaps, or swizzling channels (The incoming `texture-component-swizzle` feature).
But the cloning is unnecessary and expensive. The underlying wgpu API allows you create different views from the same texture.
## What solution would you like?
Split Image into two assets: Image, and ImageView which depends on a `Handle`. Then Replace all `Handle
` with `Handle` in components that need an image.
## What alternative(s) have you considered?
No
Contributor guide
Assessment
This issue has not been assessed yet.