webgl-operate icon indicating copy to clipboard operation
webgl-operate copied to clipboard

support msdf fonts for text rendering

Open cgcostume opened this issue 4 years ago • 1 comments

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.

  • [ ] Implement switch to enable MSDF instead of SDF
  • [ ] Implement simple example comparing both techniques side by side

cgcostume avatar Mar 05 '20 07:03 cgcostume

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

anne-gropler avatar Mar 05 '20 12:03 anne-gropler