Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Shadow under font which disappears when enabled

Discussion in 'UGUI & TextMesh Pro' started by Yerendi, Jun 23, 2022.

  1. Yerendi

    Yerendi

    Joined:
    Mar 11, 2016
    Posts:
    18
    I have some places in project where font on "Game" tab (and in build) is blurry. It requires disabling end enabling component to make it display properly.
    "Game" tab:

    "Screen" tab:

    Inspector:

    Disable and enable:
    https://gyazo.com/2c8e50e601a8052330b0c9824057c13e (gif)
    Here are some settings that can be helpful:


    Material used in this text:


    Any ideas? I've rebaked font multiple times with different settings, it's always the same.
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Just for testing purposes, switch to using one of the SSD shaders included in the TMP Essential Resources. These shaders have the suffix SSD in their names.

    Let me know if the issue persists when using one of those shaders?

    If the issue goes away, then we are dealing with an SDF Scale issue where the scale of the game view or text object changes without the text object knowing about it. Are you doing anything special with respect to scaling or using a CanvasScaler?
     
    Yerendi likes this.
  3. Yerendi

    Yerendi

    Joined:
    Mar 11, 2016
    Posts:
    18
    Ok, changing to SSD shaders did help!
    I use CanvasScaler in Scale With Screen Size mode and at the game start Match is changed from 1 to 0, so I guess that would be it.
    Are there any drawbacks of using SSD shaders? Because it looks like it solved my problem.
     
  4. Yerendi

    Yerendi

    Joined:
    Mar 11, 2016
    Posts:
    18
    @Stephan_B can you confirm that it's "safe" to use SSD shaders?
     
  5. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    It is safe to use the SSD shaders.

    There is a performance difference between the normal SDF Shaders and SSD shaders but unless you are planning on running on old mobile devices, everything should be fine.
     
    Yerendi likes this.