feat: GPU scissor rect for paper-space viewport wires

Viewport-projected wires now clip at pixel level to their viewport boundary.

- WireModel.vp_scissor: Option<[f32; 4]> — paper-space bbox set on projection
- WireGpu.vp_scissor carries it through to the draw loop
- Pipeline.compute_wire_scissors() converts paper→NDC→pixel each frame
- render() calls set_scissor_rect() per wire, reset after viewport group
- INTEGRATION_GAPS.md: Viewport ⚠️ → ✅, all 51 gaps resolved

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-05-06 07:12:05 +03:00
commit 899b3f4796
38 changed files with 112 additions and 13 deletions

View file

@ -63,6 +63,9 @@ pub struct WireModel {
/// When false the linetype pattern restarts at each NaN-separated segment
/// (DXF PLINEGEN=0). When true the pattern runs continuously (PLINEGEN=1).
pub plinegen: bool,
/// Paper-space bounding box [x0, y0, x1, y1] for GPU scissor clipping.
/// Set only for viewport-projected wires in paper-space layouts.
pub vp_scissor: Option<[f32; 4]>,
}
impl WireModel {
@ -89,6 +92,7 @@ impl WireModel {
key_vertices: vec![],
aabb: Self::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
}
}
@ -189,6 +193,7 @@ impl Default for WireModel {
key_vertices: Vec::new(),
aabb: Self::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
}
}
}