cad-editor/src/scene/pipeline
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven 6ae3a9d91d fix(pipeline): hatch frustum cull tests AABB in wrong space
`HatchGpu.world_aabb` was built by iterating `model.boundary` — but
those vertices are stored as f32 offsets from `model.world_origin`
(precision anchor for UTM-scale WCS). So the AABB was in
*origin-relative* space, not the local space `view_proj` projects
from. `aabb_offscreen` (Phase 2.3) then asked "is this rect near (0,0)
in NDC?" instead of "is this rect at the hatch's actual position?" —
which culled in-view hatches whenever the camera moved off the
origin and rendered out-of-view ones near it.

Sub-pixel LOD (`aabb_below_pixel`, Phase 3.3) survived because it
measures a projected diagonal, which is translation-invariant.

Fixes:
- Add `world_origin` back when building `HatchGpu.world_aabb`, so the
  stored rect is in absolute local space.
- 25 % margin on the viewport rect in `aabb_offscreen`, matching the
  wire path's `view_world_aabb` margin — keeps hatches at the edge
  rendered while panning.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 15:36:15 +03:00
..
face3d_gpu.rs fix(scene): greek text rect renders filled at the text's own color 2026-05-15 16:32:27 +03:00
hatch_gpu.rs fix(pipeline): hatch frustum cull tests AABB in wrong space 2026-05-17 15:36:15 +03:00
image_gpu.rs perf(scene): extend viewport scissor to hatch / image / wipeout passes (Phase 1.4) 2026-05-15 23:13:16 +03:00
mesh_gpu.rs perf(scene): multi-resolution mesh LOD (Phase 3.4) 2026-05-15 23:30:13 +03:00
mod.rs fix(pipeline): hatch frustum cull tests AABB in wrong space 2026-05-17 15:36:15 +03:00
uniforms.rs perf(scene): hatch LOD — solid-fill substitute + sub-pixel skip (Phase 3.3) 2026-05-15 23:18:21 +03:00
viewcube.rs cargo fmt 2026-05-12 10:36:15 +03:00
wire_gpu.rs chore: remove dead UI helpers and orphan toolbar stubs 2026-05-16 00:04:44 +03:00