Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ClearColor in 2d pipelines #13378

Merged
merged 5 commits into from
May 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ impl ViewNode for MainTransparentPass2dNode {
) -> Result<(), NodeRunError> {
let view_entity = graph.view_entity();

if !transparent_phase.items.is_empty() {
// This needs to run at least once to clear the background color, even if there are no items to render
{
#[cfg(feature = "trace")]
let _main_pass_2d = info_span!("main_transparent_pass_2d").entered();

Expand All @@ -51,7 +52,9 @@ impl ViewNode for MainTransparentPass2dNode {
render_pass.set_camera_viewport(viewport);
}

transparent_phase.render(&mut render_pass, world, view_entity);
if !transparent_phase.items.is_empty() {
transparent_phase.render(&mut render_pass, world, view_entity);
}

pass_span.end(&mut render_pass);
}
Expand Down