Rethinking render world #6986
PixelDust22
started this conversation in
General
Replies: 1 comment 2 replies
-
See #6503 for some of those realized performance gains. I would very much like to be able to use this pattern more widely though: I agree that special casing rendering feels wrong. And similarly, being able to swap strategies seamlessly and benchmark the difference in real apps would be lovely. |
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.
-
Recently I've been working on some rendering features and I realized that the separation between the "main world" and the "render world" requires a lot more boilerplate code to be written. Working with the Extract phase feels awkward, repetitive, redundant and prone to error. I looked back at the bevy 0.6 release notes and here are the benefits claimed for having a two-world design:
There might be a few assumptions we're making here:
draw_indirect
ortrace_rays
draw calls and nothing else, in which case the render app logic would be far cheaper.Regarding the second point in these arguments, here's another question I have: what makes Render special? If we have a separate subapp for Render, why not also have a subapp for physics, network, etc so we can have "Clearer Dataflow and Structure" everywhere?
In parallel to that, if the increased performance came from overlapping work from two frames, why couldn't this be exploited from the ECS itself so that nothing needs to live in a separate world? Systems on the beginning of next frame could execute in parallel to systems at the end of the current frame as long as they're not accessing the same set of resources.
In general, having two worlds seem to introduce a lot of unnecessary complexity, so I'm hoping that these costs were justified. I haven't seen a conversation on this topic, but I might be missing something. I would appreciate any pointers towards old discussions that might help answering those questions.
Beta Was this translation helpful? Give feedback.
All reactions