Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TextMesh Pro Random offset in letters position when rendered with SDF, SDF8, SDF16 and SDF32

Discussion in 'UGUI & TextMesh Pro' started by DmitryIRJ, Dec 18, 2019.

  1. DmitryIRJ

    DmitryIRJ

    Joined:
    Nov 20, 2019
    Posts:
    2
    We are using SDF32 render mode for our text assets and some letters are displayed with small random offset. This offset is small but quite noticeable when you show text with big size. The problem is only present when using SDF, SDF8, SDF16 and SDF32 render modes, all other modes work well.

    For example, I generated text asset with this settings:
    • Font: LiberationSans (works with other fonts as well)
    • Sampling Point Size: 57
    • Padding: 10
    Here is a comparison of SDF32 and SDFAA variants:
    Untitled-1.png

    Notice how in SDF32 variant letter 4 is moved upward compared to letter 5.

    The only thing affecting this random offset is Sampling Point Size. On smaller point sizes those offsets become more noticable. For example, here the point size is changed between 27 and 26:
    https://i.gyazo.com/411a177caaf2946fd82e12e0959905c9.mp4

    Tested with versions 1.4.1 and 2.1.0 preview 2
     
    Last edited: Dec 18, 2019