Merge PR #300: tessellate hatch fills so navigation no longer flickers (#258)

External contribution by sLuCHa. Triangulates each hatch boundary once
(lyon even-odd, cached with the batch build) and rasterizes the triangles
instead of the per-fragment point-in-polygon test, removing the screen-fill
overdraw + boundary raycast that forced the flicker-causing interaction LOD
(now default off behind OCS_HATCH_LOD). Precision preserved (triangles in the
same world_origin-relative frame + RTE path); untessellatable boundaries fall
back to the old AABB-quad + in_polygon path (poly_test=1).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-07-07 21:45:02 +03:00
commit fe00bc30ba
6 files changed
+236 -58

No files matched your search

+10
View File
@@ -1201,6 +1201,16 @@ impl Scene {
.map_or(false, |t| t.elapsed().as_millis() < Self::NAV_SETTLE_MS)
}
/// Whether the interaction-LOD hatch suppression is enabled (env
/// `OCS_HATCH_LOD`), read once. Default OFF: the tessellated hatch pass is
/// cheap enough that suppression — and its zoom flicker (#258) — is not
/// needed. Kept behind the flag as a safety net for pathological drawings.
pub fn hatch_lod_enabled(&self) -> bool {
use std::sync::OnceLock;
static ON: OnceLock<bool> = OnceLock::new();
*ON.get_or_init(|| std::env::var_os("OCS_HATCH_LOD").is_some())
}
/// True for a short window around navigation — used by the subscription to
/// keep requesting frames just past the settle point so the one full-quality
/// (hatched) frame actually renders after the cursor stops, even when no