TextMeshPro Smudgy In Game

Hey guys. When i add an outline to my TextMeshPro font, those stains appear in game and in scene view everythings fine. does anybody know why this can happen?

Those artifacts are the result of the ratio of Sampling Point Size to Padding being too small. See link to FAQ here and then Question #2.

The solution is to simply increase the padding value. Typically you want a ratio of sampling point size to padding of about 10%. So if the sampling point size is 90 then a padding value of 9 works well or sampling of 80 with padding of 8. The issue occurs when this ratio is less than 2% ~ 3% when using material properties that are closer to the max range of properties like outline, etc. when the text is zoomed out / small on screen.

The larger the ratio the more range the Outline / Shadow will have but the larger the padding the more texture space the padding occupies thus forcing a smaller sampling point size. When creating font assets, think of how it will be used. If you plan on using an Outline, Shadow, etc. then a ratio of 10% is great. If you plan on having huge shadow offset then a larger padding / ratio will be necessary. If the text will be plain without styling then a smaller ratio like 5% will work and help to maximize sampling quality.

3 Likes

thanks a lot! very informative :slight_smile: