Search Unity

TextMesh Pro Text effect causes... artifact on small text

Discussion in 'UGUI & TextMesh Pro' started by Tom-Kazansky, Jun 15, 2022.

  1. Tom-Kazansky

    Tom-Kazansky

    Joined:
    Mar 9, 2015
    Posts:
    58
    Hi,
    I want my TMP to have an "outline" so I use Underlay effect, but there is some background appear under the text, more apparent on small text.

    TMP_Issue.png TMP_settings.png TMP_settings2.png
    this does not appear in "Scene" view, only appear in "Game" view.

    is there some settings I have to update or is this an issue from the font I'm using?
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The above is most likely caused by the Sampling Point Size to Padding Ratio of your font asset being too small combined with user material property values near their max range.

    When material property values are near their max range, you are at the edge of the adjacent glyph in the atlas texture where as a result of bilinear filtering we can get these artifacts.

    The solution is to increase this Sampling Point Size to Padding Ratio where for instance, if your sampling point size is 80 and padding is 8 for a ratio of 10%, then increase the padding to 12 will increase the effective range of material properties where you will be able to use smaller values to achieve the same visual FX but without the visual artifacts.

    See FAQ Question #2 and #10 from this thread for more information.
     
    Tom-Kazansky likes this.