Open Dimev opened 3 years ago
and things like Draw don't work with compute passes
I'm a little confused because compute passes can't draw things to the screen its not possible. Ideally compute runs before any draw nodes.
Example:
hmm Effectively I need to run a compute shader for all meshes that are drawn, then write to a shared texture, so having some ways to process things with compute in a draw pipeline would be handy
hmm Effectively I need to run a compute shader for all meshes that are drawn, then write to a shared texture, so having some ways to process things with compute in a draw pipeline would be handy
I'm not really sure how VCT works in terms of vowelizing meshes, but if I had to guess you would pass a list of mesh buffers to the compute shader along with a list of game entities and transforms.
yeah, I'd have to run the compute shader per mesh, then run another after that is done again, which I still have no idea of how that would work
What problem does this solve or what need does it fill?
I'm working on adding voxel cone tracing, which requires meshes to be processed with a compute shader. Right now, some of the compute bindings from wgpu are still missing, and things like Draw don't work with compute passes
What solution would you like?
Something similar to how the Draw logic currently works, but in a way that allows compute shaders as well, by either allowing it to have both Compute and Render passes, or making a seperate system that works for compute.
What alternative(s) have you considered?
None yet, besides implementing this myself, but I'll need help with understanding how the draw system works in more detail first.
Additional context
I've already made a pr for adding some of the missing wgpu exports for compute in #2628, but not much more. I'm also working on the voxel cone tracing here: https://github.com/Dimev/bevy-vxgi, but I have no clue how correct this is due to not knowing much about the rendering system (yet)