#Custom Render Pipeline Documentation
18 messages · Page 1 of 1 (latest)
I'm looking to do a few things:
- Custom shaders with optimisations for specific use-cases.
- Custom render passes.
- Some compute shaders.
- Learn some more WGPU.
I'm not looking to use the bevy_pbr pipeline, so I've been reading through how it integrates into bevy_render. I was hoping there might be some up-to-date resources that I could use to figure out how to do this correctly.
I did have a look at bevy-hikari but it's a fair bit behind version wise on Bevy so I can't rely on that for some pointers.
It really depends... If you want like customer object rendering, there's a variety of ways to do things. You could reuse bevy's gbuffer for lighting and just have a custom draw call to write the gbuffer, or do fully custom, etc
Or if you just want some post processing or certain effects you can do that and reuse the rest of bevy
It kinda heavily depends on what you want to do
If you have some more concrete use cases I'd be happy to show you where to get started
Initially what I'm looking to do is:
[x] Create a custom Cuboid component with a size field.
[x] Extract the cuboid in the ExtractSchedule set.
[x] Prepare the cuboid (create or retrieve WGPU buffers for vertices, indices) based on the extracted data.
[x] Prepare bind groups.
[ ] Figure out how to integrate in to the render graph.
[ ] Figure out how to issue draw calls while incorporating the views/camera stuff Bevy has.
Are there any resources that breakdown how the current bevy_render crate works in detail? I'm just guessing based on the bevy_pbr crate.
- Just create a bevy component
- Derive ExtractComponent, add ExtractComponentPlugin<Cuboid> to the main render world. You might also need SyncComponentPlugin or something? Idr tbh
3/4. Setup prepare systems in the render world. Or do this whenever you want really, but prepare is the typical RenderSet. - Add a custom render node to the render graph. Lots of examples of this>
- Make a draw call in your render node
If you want to reuse the existing render passes, you need a custom draw/phase item thing, I'm less familiar with the details of that, but there's an example for it
Right, so the impls of RenderCommand for unit structs like DrawMesh are for the draw/phase stuff?