Skip to content
Discussion options

You must be logged in to vote

Integer texture coordinates correspond to halway-points between pixels, while values ending in .5 are the actual centers of pixels. For example, if you have a tiny 2x2 texture, centers of pixels are at [0.5, 0.5], [0.5, 1.5], etc., While the coordinate [1, 1] is exactly in-between the four pixels. Therefore, using .5 texture coordinates makes sure that pure pixel colors are at the perimeter of the quad, which is more important when the texture is being upscaled (typical for SDF). If you wanted to avoid bilinear filter bleed from neighboring glyphs while keeping integer coordinates, the atlas would have to have 2 pixels thick border between glyphs, so that the integer coordinate can be set…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@jiangbo
Comment options

@Chlumsky
Comment options

Answer selected by jiangbo
@jiangbo
Comment options

@Chlumsky
Comment options

@jiangbo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #141 on January 07, 2026 09:19.