Multiple Render Backends #3598
PixelDust22
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Would it be possible to implement what you need as a |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First of all, congrats on the release of bevy 0.6! The new
bevy_render
is definitively going to be an important step towards making bevy a true general-purpose game engine!However, looking at the codebase for the new renderer I'm a bit disappointed that I wouldn't be able to use most of the new features that were introduced in this new version due to our decision to use
wgpu
directly.I'm currently working on a voxel renderer and my tech requires the use of many Vulkan extensions that are currently unimplemented in wgpu -
VK_KHR_ray_tracing
,VK_KHR_buffer_device_address
,VK_KHR_acceleration_structure
andvkQueueBindSparse
just to name a few. These extensions are not just a "nice-to-have" for my purpose - they're going to be a requirement for the renderer to function properly due to the intrinsic complexity of the voxel raytracer. I don't expect these features to be implemented anytime soon onwgpu
- how are you going to build a cross-platform sparse binding feature when wgpu doesn't even have the concept of "memory binding"?Before the render rewrite I was able to get around those issues by replacing
bevy_wgpu
with a custom backend that calls Vulkan APIs directly. I could still do the same thing today by completely replacingbevy_render
with a custom implementation, but that also means I wouldn't be able to take advantage of render graphs, cameras, the Render subapp and most of the other nice things that was included in this release. And becausebevy_render
is such a core component of the bevy engine, it also means that any application using a custom renderer wouldn't be compatible with the rest of bevy's ecosystem.Referring to cart's comment in #639:
Now that we've released the new renderer, it might be a good opportunity to start a discussion about having multiple render backends to support features that are absent on
wgpu
. If I'd like to build abevy_contrib_vk
for a render backend that calls Vulkan APIs directly, how is that going to work in tandem with thebevy_render
that we currently have?I understand that using
wgpu
directly is probably a good idea for the goals that bevy wants to achieve. Looking at the codebase I think there aren't manybevy_render
components that would require a direct dependency on wgpu - at least thecamera
,color
,mesh
,primitives
, andrender_graph
modules can be easily extracted out from bevy_render and put into a separate crate that doesn't depend onwgpu
.So I guess my question is
bevy_render
so that a custom renderer could also depend on these components? If it requires building a small abstraction on certain wgpu types would that be acceptable?bevy_render_vulkan
for example, is it possible for it to work alongsidebevy_render
?Beta Was this translation helpful? Give feedback.
All reactions