Rendering crisp and performant 2D text in WebGL/GPU is hard, but MSDF text rendering is a fantastic solution that has helped many of my and others’ implementations. The current method of rendering 2D text with Babylon using dynamic textures is also great but comes with drawbacks with large amounts of text and resolution quirks.
It would be fantastic to have this feature natively supported in Babylon, allowing it to be used more universally in applications while being easier to maintain.
There are some great examples from the community using this method already:
Small font was something I also had struggle on.
I know some engine draws prerendered bitmap font texture when size is below certain threshold.
I’ve tried to implement subpixel like this: GitHub - astiopin/webgl_fonts: WebGL font rendering, but had no luck getting viable result. Looking back now; I probablly made mistake where astiopin/webgl_fonts is only considering 2D space and I didn’t take screenspace in to account.
Hmmm, seems the texture is staticly prebuilt, and contains only necessary chars. I’ve tried with FXAA and have no luck, would antialiasing help in this case?
Also, since the font texture is static, is it practical to use this tech over CJK and other unicode chars? Unicode 16 contains 154k chars now.
Hmmm, can the texture be assemblied on-the-fly? Since browser has some builtin texture rendering methods, like measuring and drawing text to canvas, and upload the canvas as font texture