-
Couldn't load subscription status.
- Fork 1.1k
Description
Hey, I'm trying to build a sprite renderer on top of wgpu, and one issue I'm running into is how to easily switch between textures on a per-frame basis. Ideally I don't want to have to create a BindGroup for each texture, and 2D textures aren't ideal either as the textures are not all the same size. One option that is interesting is to create an array of texture descriptors that I can index with a uniform. Something like this:
layout(set = 0, binding = 1) uniform texture2D textures[1024];
but this doesn't seem to be supported by wgpu - looking through the code I found: https://github.com/gfx-rs/wgpu/blob/master/wgpu-native/src/device.rs#L840 - which suggests that the descriptorCount cannot be configured.
Is this something in the works, or is there a better way I haven't considered?
Thanks