How to integrate Terra (planet lib) project with bevy #2210
Replies: 2 comments 3 replies
-
Bevy doesn't expose raw wgpu from it's api as it can work fine with other rendering api's too. For example bevy_webgl2 uses webgl2 to run bevy apps in the browser. Bevy is very flexible, so it is possible to completely avoid bevy_render/bevy_wgpu and instead let terra render everything I think. This means that you will have to manually render entities yourself. Alternatively you could fork bevy_wgpu to give you direct access to what you need. Just be careful that terra and bevy_wgpu don't run over each others by for example each clearing the screen as a first pass. |
Beta Was this translation helpful? Give feedback.
-
Hi, I have forked both bevy and terra projects, I faced many issues but the somewhat good news is that both terra and bevy are initializing, pub fn terra_render(device: &wgpu::Device,
queue: &wgpu::Queue,
color_buffer: &wgpu::TextureView,
depth_buffer: &wgpu::TextureView,
size: (u32,u32),
terrain: &mut Terrain) But I dont know how to fight with render graph for these, the other way around might be to stuff terra_rendering code as a graph step or node? If anyone is willing to help here, here is the modified codes of both projects https://github.com/demon-hide/bevy It will atleast render without textures cargo run --example load_gltf |
Beta Was this translation helpful? Give feedback.
-
https://github.com/fintelia/terra
How can I plug terra into bevy, it requires access to webgpu device and queue atleast.
Beta Was this translation helpful? Give feedback.
All reactions