Hacker GitHub

← All repos

Chlumsky/msdfgen

View on GitHub ↗ ★ 4,964 C++

Multi-channel signed distance field generator

17 mentions on Hacker News by 15 people: 1 story, 16 comments · first 2019-05-27 · latest 2026-06-12

Mentions per year 17 mentions · busiest year 2022 (5)
20082026
  1. …feeling lucky and lazy". After 10 minutes it had: - Installed msdf_gen library (great library btw https://github.com/chlumsky/msdfgen ) - Created a CLI tool to convert TTF to SDF JSON/XML - Ran the tool, did smoke tests on the resulting…
  2. MSDF is worth looking at: https://github.com/Chlumsky/msdfgen and https://steamcdn-a.akamaihd.net/apps/valve/2007/SIGGRAPH2007... The context is GPU's, things like three.js But yes, drawing text is hard.
  3. …and SDF are new to me and very interesting. Another example of what is being done is MSDF here: https://github.com/Chlumsky/msdfgen .
  4. …it a bit by having multiple distance fields and rendering the intersection of them. See e.g. https://github.com/Chlumsky/msdfgen
    comment by account42 · 2025-06-13 · in Rendering Crispy Text on the GPU
  5. This very well explained here https://github.com/Chlumsky/msdfgen and with more details in linked pdfs. Basically, signed distance fields allow high resolution renders from low resolution rasters which represent character shape. It's used…
    comment by febusravenga · 2023-12-11 · in Shader Park Is Kinda Neat
  6. …separate parts, albeit the colors losing their sharpness above the texture's 1:1 resolution. [1] https://github.com/Chlumsky/msdfgen
    comment by FrostKiwi · 2023-07-21 · in Sub-pixel distance transform
  7. …rounding sharp corners. This is known as a “multi-channel signed distance field”, or “msdf”. https://github.com/Chlumsky/msdfgen
  8. Look into msdf rendering for text in WebGL. https://github.com/Chlumsky/msdfgen
  9. …scaling up before looking bad That problem has been solved by multi-channel signed distance fields https://github.com/Chlumsky/msdfgen
    comment by johndough · 2022-08-10 · in Vector graphics on GPU
  10. What I was referring is SDFs/MSDFs as in https://github.com/Chlumsky/msdfgen . Of course you can implement smooth circles directly in a shader the way you describe, but note that there are Vector outline shapes that are not circles...…
    comment by jstimpfle · 2022-08-10 · in Vector graphics on GPU
  11. …in practice. Seems like it would fix, or at least minimize the scaling/offset issues quite nicely. https://github.com/Chlumsky/msdfgen
  12. …consideration but this project uses real time Multi-channel signed distance field generation : [1] https://github.com/Chlumsky/msdfgen
    comment by jimmySixDOF · 2022-02-14 · in Text Rendering Hates You (2019)
  13. ….com/drawing-text-with-signed-distance-fi... MIT-licensed open-source multi-channel glyph generation: https://github.com/Chlumsky/msdfgen The only remaining issue would be the kerning/layout, which is admittedly far from simple.
    comment by pvidler · 2021-03-15 · in 2D Graphics on Modern GPU (2019)
  14. msdfgen : https://github.com/Chlumsky/msdfgen
  15. …somewhat recently a great improvement was made to SDF using multiple channels of information: https://github.com/Chlumsky/msdfgen I wonder how they both compare. I am guessing Slug is more accurate but certainly also much more intensive,…
  16. …as you tend to get sharp edges and artefacts [1]. [0] https://github.com/VALIS-software/GPUText [1] https://github.com/Chlumsky/msdfgen/issues/67