diff --git a/crates/bevy_render/src/pass/render_pass.rs b/crates/bevy_render/src/pass/render_pass.rs index aac0bf4bc9c48..7d5091b125fd1 100644 --- a/crates/bevy_render/src/pass/render_pass.rs +++ b/crates/bevy_render/src/pass/render_pass.rs @@ -11,6 +11,7 @@ pub trait RenderPass { fn set_vertex_buffer(&mut self, start_slot: u32, buffer: BufferId, offset: u64); fn set_pipeline(&mut self, pipeline_handle: &Handle); fn set_viewport(&mut self, x: f32, y: f32, w: f32, h: f32, min_depth: f32, max_depth: f32); + fn set_scissor_rect(&mut self, x: u32, y: u32, w: u32, h: u32); fn set_stencil_reference(&mut self, reference: u32); fn draw(&mut self, vertices: Range, instances: Range); fn draw_indexed(&mut self, indices: Range, base_vertex: i32, instances: Range); diff --git a/crates/bevy_wgpu/src/wgpu_render_pass.rs b/crates/bevy_wgpu/src/wgpu_render_pass.rs index a27ff795f8942..6aa59b7f3415a 100644 --- a/crates/bevy_wgpu/src/wgpu_render_pass.rs +++ b/crates/bevy_wgpu/src/wgpu_render_pass.rs @@ -31,6 +31,10 @@ impl<'a> RenderPass for WgpuRenderPass<'a> { .set_viewport(x, y, w, h, min_depth, max_depth); } + fn set_scissor_rect(&mut self, x: u32, y: u32, w: u32, h: u32) { + self.render_pass.set_scissor_rect(x, y, w, h); + } + fn set_stencil_reference(&mut self, reference: u32) { self.render_pass.set_stencil_reference(reference); }