feat(pipeline): batched-hatch GPU resources + builder (Phase 4-B, step 1)
Stand-alone module — no consumers yet. Packs an entire `&[HatchModel]` into four storage buffers + a per-vertex (corner, instance_index) stream: - `InstanceBuffer` — `HatchInstance[]` (112 B each): color, mode, gradient params, world_origin, local-space aabb, boundary range, family range, visibility flag. - `BoundaryBuffer` — flat `vec4<f32>[]` (NaN markers preserved as per-path separators, just like the per-hatch shader expects). - `FamilyBuffer` — flat `LineFamilyGpu[]` (matches the per-hatch family layout one-for-one apart from `dash_offset` indexing into a separate dash buffer). - `DashBuffer` — flat `f32[]`. The per-vertex buffer holds `6 × instance_count` records of `(corner: u32, instance_index: u32)`. Step 2 will add the matching WGSL shader that uses these to project a per-instance AABB quad and run the in-polygon test against `BoundaryBuffer[offset..offset+count]`. iced reports 8 storage buffers per stage, 128 MB binding cap, 256 MB buffer cap — plenty for ~10 k hatches × 112 B + ~32 MB boundaries. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
a0412534ae
commit
fe202f5f8e
2 changed files with 457 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
pub mod face3d_gpu;
|
||||
pub mod hatch_batched_gpu;
|
||||
pub mod hatch_gpu;
|
||||
pub mod image_gpu;
|
||||
pub mod mesh_gpu;
|
||||
|
|
|
|||
Loading…
Reference in a new issue