feat(text): bypass the greek/baseline LOD ladder for SDF text

With OCS_TEXT_SDF on, top-level text took the full path only at ≥5 px and
still drew greeked OBB rects / baseline lines when zoomed out — doubling
with the SDF glyphs. Force the text LOD height to None while SDF is on so
text always falls through to the full path, which is itself suppressed to
an empty snap-only wire; SDF then renders it crisply at every zoom.
(Block-internal text is unaffected — it is not collected for SDF, so its
wire/greek path stays.)

Verified in-app: zoomed-out SDF text stays crisp with no greek/baseline
double draw. Flag off: unchanged.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-07-07 08:24:11 +03:00
1 parent 9f60470067
commit 75ddab6da7
1 file changed
+8
+8
View File
@@ -613,6 +613,14 @@ pub(crate) fn tessellate_entity(
}
_ => None,
};
// SDF text renders crisply at every zoom, so bypass the baseline/greek
// LOD ladder entirely — fall through to the full path, which is itself
// suppressed to an empty (snap-only) wire while SDF is on.
let text_height = if crate::scene::text::sdf_atlas::sdf_text_enabled() {
None
} else {
text_height
};
if let Some(h_world) = text_height {
let h_px = (h_world as f32) / wpp;
// Wrap-expanded line count for MText (Text = 1).