forked from 1b-agent/opencadstudio-upstream
fix(hatch): render fills via the per-fragment in_polygon test again
The batched hatch path pre-triangulated every boundary on the CPU (PR#300) with no cap on the resulting vertex buffer. A hatch-dense drawing (13k solid-filled hatches) built a ~6.75 GB `hatch_batched.vertex` buffer and panicked in `Device::create_buffer` (device max 256 MB), after a long stall spent triangulating on load. Drop the CPU triangulation and always draw each hatch as its AABB quad (6 verts) with `poly_test = 1`, letting the shader resolve inside/outside per fragment against the uploaded boundary — the path the shader always kept as a fallback. The vertex buffer is now 6 verts/hatch regardless of boundary complexity, so no drawing can overflow it. The interaction-LOD flicker PR#300 addressed no longer occurs (OCS_HATCH_LOD defaults off). Removes the now-unused hatch_tess triangulation module. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
492ad940eb
commit
4df41cdf34
3 files changed
+19
-178
No files matched your search
@@ -1,6 +1,5 @@
|
||||
pub mod face3d_gpu;
|
||||
pub mod hatch_batched_gpu;
|
||||
pub mod hatch_tess;
|
||||
pub mod hatch_gpu;
|
||||
pub mod image_gpu;
|
||||
pub mod mesh_gpu;
|
||||
|
||||
Reference in new issue
Block a user