forked from 1b-agent/opencadstudio-upstream
Simplify glyph atlas UV calculation
This commit is contained in:
1 parent
bd6447d930
commit
91e94dc693
1 file changed
+2
-2
@@ -395,8 +395,8 @@ impl GlyphAtlas {
|
|||||||
// This prevents bilinear filtering from bleeding into neighbouring tiles.
|
// This prevents bilinear filtering from bleeding into neighbouring tiles.
|
||||||
uv_min: [(ox as f32 + 0.5) / fw, (oy as f32 + 0.5) / fh],
|
uv_min: [(ox as f32 + 0.5) / fw, (oy as f32 + 0.5) / fh],
|
||||||
uv_max: [
|
uv_max: [
|
||||||
(ox as f32 + tile.w as f32 - 0.5) / fw,
|
((ox + tile.w) as f32 - 0.5) / fw,
|
||||||
(oy as f32 + tile.h as f32 - 0.5) / fh,
|
((oy + tile.h) as f32 - 0.5) / fh,
|
||||||
],
|
],
|
||||||
plane_min: tile.plane_min,
|
plane_min: tile.plane_min,
|
||||||
plane_max: tile.plane_max,
|
plane_max: tile.plane_max,
|
||||||
|
|||||||
Reference in new issue
Block a user