AsBindGroup derive for ImageSamplerDescriptor in custom Material
- 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?
When making a custom material, it is possible to use the AsBindGroup derive to assign members of the material struct to the slots. I want to create a material where multiple materials can use the same image, with different samplers. So I have a Material struct with one of the members being ImageSamplerDescriptor. It would be nice to be able to assign #[sampler(_)] to the ImageSampler(Descriptor) to use the specified sampler instead of the one in the Image.
I have considered workarounds such as cloning the Image and editing the sampler there, but this is very wasteful in terms of (V)RAM usage.
This is maybe also possible when manually writing the bind groups, but this (for me at least) is very complex and work-intensive.
Contributor guide
Assessment
This issue has not been assessed yet.