Replies: 2 comments
-
I have created an initial implementation of this feature and was able to run it in my own project. Example: #[derive(AsBindGroup)]
struct MyMaterial {
// By adding "raw", it indicates the use of GpuImage.
// I thought it would be better to use an existing attribute rather than adding a custom one.
#[texture(0, raw)]
#[sampler(1)]
my_texture: GpuImage,
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
I realized that this issue can be resolved without modifying Bevy's source code. By writing the results calculated in the ComputeShader to a Texture and copying it to a GpuImage in the Render frame, the same functionality can be reproduced. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to request the addition of support for raw
GpuImage
in theAsBindGroup
derive macro.Currently, when an
Image
is added as an asset, it is automatically extracted into the RenderWorld and converted into aGpuImage
by theImagePlugin
, making it impossible to reference an already created GpuImage as a binding.This feature would allow for the binding of pre-existing wgpu textures. Additionally, it could be used to asynchronously execute compute shaders and display their results.
Example:
Beta Was this translation helpful? Give feedback.
All reactions