You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What problem does this solve or what need does it fill?
Currently the AsBindGroup macro supports the BindingTypesUniform, Texture, Sampler and Storage.
Wgpu also has the BindingType type StorageTexture which enables direct read/write access to textures without sampling (e.g. from a compute shader where samplers are not supported). This is currently not supported by the AsBindGroup macro.
For an example use case check out Bevy's compute_shader_game_of_life example. This example currently cannot be written using AsBindGroup.
What solution would you like?
The AsBindGroup derive macro should support the BindingType StorageTexture in ReadOnly, ReadWrite and WriteOnly configurations in order to enable compute shader processing of textures.
What alternative(s) have you considered?
Continue constructing BindGroups and BindGroupLayouts manually for this use case.
Additional context
The BindingType Storage was added in #6129. This PR could perhaps serve as reference for implementing the BindingType StorageTexture
The text was updated successfully, but these errors were encountered:
Thank you @Patryk27, that's good to know!
Unfortunately, I also need to write to a texture which cannot be done with a regular Texture binding. That still requires a StorageTexture binding.
Hi all!
I'm new to the repo (and open source in general actually), but I came across this issue myself after reading over the compute_shader_game_of_life example, and was inspired to take a look. I have a functioning implementation in a fork I've been toying around with locally and would be happy to contribute it to the main repo!
I would appreciate some guidance on what the process looks like though if possible: should I just open the PR from my fork and go from there?
What problem does this solve or what need does it fill?
Currently the AsBindGroup macro supports the
BindingTypes
Uniform
,Texture
,Sampler
andStorage
.Wgpu also has the BindingType type
StorageTexture
which enables direct read/write access to textures without sampling (e.g. from a compute shader where samplers are not supported). This is currently not supported by the AsBindGroup macro.For an example use case check out Bevy's compute_shader_game_of_life example. This example currently cannot be written using AsBindGroup.
What solution would you like?
The AsBindGroup derive macro should support the BindingType StorageTexture in ReadOnly, ReadWrite and WriteOnly configurations in order to enable compute shader processing of textures.
What alternative(s) have you considered?
Continue constructing BindGroups and BindGroupLayouts manually for this use case.
Additional context
The BindingType Storage was added in #6129. This PR could perhaps serve as reference for implementing the BindingType StorageTexture
The text was updated successfully, but these errors were encountered: