From 6f9a362a4d152d59488528254e04416c318f3ad4 Mon Sep 17 00:00:00 2001 From: Qwerasd Date: Tue, 25 Mar 2025 20:57:08 -0600 Subject: [PATCH] fix(Metal): fix crunchy appearance of constrained glyphs We can't use nearest neighbor filtering for sampling from the atlas because we might not actually be doing pixel perfect sampling if the glyph has been constrained. This will change in the future, but this will have to be set to linear for now. --- src/renderer/shaders/cell.metal | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/renderer/shaders/cell.metal b/src/renderer/shaders/cell.metal index e24ddcb1e..84212ad3a 100644 --- a/src/renderer/shaders/cell.metal +++ b/src/renderer/shaders/cell.metal @@ -499,7 +499,11 @@ fragment float4 cell_text_fragment( constexpr sampler textureSampler( coord::pixel, address::clamp_to_edge, - filter::nearest + // TODO(qwerasd): This can be changed back to filter::nearest when + // we move the constraint logic out of the GPU code + // which should once again guarantee pixel perfect + // sizing. + filter::linear ); switch (in.mode) {