diff --git a/crates/bevy_core_pipeline/src/upscaling/node.rs b/crates/bevy_core_pipeline/src/upscaling/node.rs index c0a703b208a8e..fda20578458b6 100644 --- a/crates/bevy_core_pipeline/src/upscaling/node.rs +++ b/crates/bevy_core_pipeline/src/upscaling/node.rs @@ -84,6 +84,14 @@ impl ViewNode for UpscalingNode { .command_encoder() .begin_render_pass(&pass_descriptor); + if let Some(camera) = camera { + if let Some(viewport) = &camera.viewport { + let size = viewport.physical_size; + let position = viewport.physical_position; + render_pass.set_scissor_rect(position.x, position.y, size.x, size.y); + } + } + render_pass.set_pipeline(pipeline); render_pass.set_bind_group(0, bind_group, &[]); render_pass.draw(0..3, 0..1); diff --git a/examples/3d/split_screen.rs b/examples/3d/split_screen.rs index a5e93fc14e8b1..13840ae010121 100644 --- a/examples/3d/split_screen.rs +++ b/examples/3d/split_screen.rs @@ -68,12 +68,6 @@ fn setup( camera: Camera { // Renders cameras with different priorities to prevent ambiguities order: index as isize, - // Don't clear after the first camera because the first camera already cleared the entire window - clear_color: if index > 0 { - ClearColorConfig::None - } else { - ClearColorConfig::default() - }, ..default() }, ..default()