cginternals / webgl-operate

A TypeScript based WebGL rendering framework.
https://webgl-operate.org
MIT License
168 stars 25 forks source link

support msdf fonts for text rendering #238

Open cgcostume opened 4 years ago

cgcostume commented 4 years ago

https://soimy.github.io/msdf-bmfont-xml/ seems to be an excellent msdf generator (utf-8 support, good parameterization etc.). The glyph fragment shader needs to account for 4 channel distance fields instead of a single one.

anne-gropler commented 4 years ago

I have generated a file using Roboto. The resolution is rather medium. Could be sufficient for normal text, while large text might come with quality issues (which you already can see at their preview here, the rendered text borders look rather blurry)

roboto-v18-latin-500-msdf.zip