-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Support for RenderPass that renders to WindowSwapChain before MainPass #3190
Description
What problem does this solve or what need does it fill?
I want to add a RenderPassthat renders to WindowSwapChain before MainPass.
This currently does not seem possible because of the Operation defined in the PassDescriptor of MainPass, that clears the color attachment.
https://github.com/bevyengine/bevy/blob/main/crates/bevy_render/src/render_graph/base.rs#L141
What solution would you like?
Clearing the color_attachment should be its own pass before MainPass, so users can add their own passes before MainPass.
What alternative(s) have you considered?
Alternatively there could be a way to change the Operation/PassDescriptor of MainPass at runtime or during initial creation (by way of parameter to RenderPlugin)
Additional context
You can fínd my attempt at adding a RenderPass before MainPass here: https://github.com/KirmesBude/bevy_background
Minimal example including a RenderGraph svg dump.
Edit: The issue exsits on 0.6, but the proposed solutions are different.