pub fn apply_layer_scissor(
rpass: &mut RenderPass<'_>,
w_px: f32,
h_px: f32,
scale: Scale,
clip_logical: Option<Rect>,
)Expand description
Applies the layer scissor, or resets to the full surface when there is no clip.
WGPU can retain scissor state across render passes in the same encoder on some backends; always setting an explicit rect avoids a narrow scissor leaking to later layers (e.g. window chrome after an editor viewport pass).
ยงExamples
use ailloli_ui_core::math::Scale;
use ailloli_ui_render_wgpu::passes::apply_layer_scissor;
fn reset(pass: &mut wgpu::RenderPass<'_>) { apply_layer_scissor(pass, 100.0, 50.0, Scale::new(1.0), None); }