MSDF Text renderer

You nailed it. You may need to adapt to zoom here

1 Like

I feel like we should almost discard around the edges of the quad within a certain threshold just to prevent any overdraw of the sdf.

image

So there really is no way to get rid of these edge artifacts?

By playing with the parameters mostly

1 Like

I’m just confused because out of other msdf solutions I have never seen these artifacts before. I want to use this one because its highly efficient, but having to juggle props to prevent rendering artifacts that should not be there seems rather ehhhhh. Maybe ill take a look at the shader code and see if there is something that can be done.

Its looking like its the thickness that is causing this. I might be able to fix this actually with props you are right. Just cant have it as bold as wanted. Looks like anything over 0.1 will cause this.

UPDATE Also using a larger msdf font image also cleaned up some artifacts.

1 Like

Yeah we may have bugs / improvements in the shaders so please do ;D

Hi!

I’m trying to use it to display scores within the game.

Is there a way to update the text?

I think the only way to achieve this right now is to dispose the renderer and create a new one. As long as you are using the font assets you already have created disposing and recreating happens very quickly. Just make sure to wait for the new text to be rendered before deleting the old text or else you will have flickering. Here is what that approach looks like with many rapid updates in my project: Bar Chart Race

It would be more ideal if there was official clearParagraph method or something like that.

2 Likes

Were you able to get around the artifacts? I tried with 1024 res but even then I see artifacts around the text as you move away from it…