From 91e94dc693e8ec968efe8132753e9a7c5c9e0425 Mon Sep 17 00:00:00 2001 From: codallos Date: Sun, 6 Sep 2026 20:38:56 -0600 Subject: [PATCH] Simplify glyph atlas UV calculation --- src/scene/text/sdf_atlas.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scene/text/sdf_atlas.rs b/src/scene/text/sdf_atlas.rs index c192389f1..dc87acdfa 100644 --- a/src/scene/text/sdf_atlas.rs +++ b/src/scene/text/sdf_atlas.rs @@ -395,8 +395,8 @@ impl GlyphAtlas { // This prevents bilinear filtering from bleeding into neighbouring tiles. uv_min: [(ox as f32 + 0.5) / fw, (oy as f32 + 0.5) / fh], uv_max: [ - (ox as f32 + tile.w as f32 - 0.5) / fw, - (oy as f32 + tile.h as f32 - 0.5) / fh, + ((ox + tile.w) as f32 - 0.5) / fw, + ((oy + tile.h) as f32 - 0.5) / fh, ], plane_min: tile.plane_min, plane_max: tile.plane_max,