Skip to content

Support for RenderPass that renders to WindowSwapChain before MainPass  #3190

@KirmesBude

Description

@KirmesBude

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions