forked from 1b-agent/opencadstudio-upstream
Companion to the storage-buffer layout from step 1. Vertex shader reads `(corner, instance_index)` per vertex, fetches the matching `HatchInstance`, projects an AABB-quad corner; a zero `visible` flag emits a NaN clip position so the GPU skips the fragment stage for culled hatches without any per-frame buffer re-upload. Fragment shader runs the same three-stage in-polygon → mode dispatch → pattern evaluation pipeline as `hatch.wgsl`, but with all ranges indexed: `BoundaryBuffer[boundary_offset..offset+count]` for the ray-cast, `FamilyBuffer[family_offset..offset+count]` for pattern lines, `DashBuffer[dash_offset..]` for dash sequences. Phase 3.3 sub-pixel LOD substitution is preserved. Step 3 will wire a pipeline + bind-group-layout around this and call `upload_hatches_batched` from render.rs (the per-hatch `upload_hatches` path stays in place for the bisect window). Co-Authored-By: Claude Opus 4.7 <[email protected]>