-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Compute Shader Integration #3970
Copy link
Copy link
Closed
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Metadata
Metadata
Assignees
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Type
Fields
Give feedbackNo fields configured for issues without a type.
What problem does this solve or what need does it fill?
For now Bevy does not have a dedicated compute pipeline abstraction, but only exposes the raw wgpu API for this use case.
The game of life example shows how to implement your own compute pipelines.
Currently there is no way to use Bevy's shader abstraction(shader defs, shader imports and hot shader reloading) for compute, which makes writing those shaders quite cumbersome.
What solution would you like?
I would like to have a way of turning a
Handle<Shader>into aShaderModule, which can be use for creating the compute pipeline.For the render pipelines we use a
RenderPipelineCache, which intern stores aShaderCache, for processing the shaders.We probably need something similar for compute pipelines (
ComputePipelineCache), or we decouple theShaderCacheentirely from theRenderPipelineCacheto cache all shaders in a single place (resource).