Got a weird issue, text is being like this:

After a little bit of debugging, this seems to be caused by parent’s localScale going from -0.1 → 1 value via tweening / easing function.
Doing this to the scale:
if (resultScale.x < 0) resultScale.x = 0;
if (resultScale.y < 0) resultScale.y = 0;
if (resultScale.z < 0) resultScale.z = 0;
fixes the issue, but its a workaround.
Is this a known issue, or is there a fix for this?
This is on Unity 2019.2.16f1 + TMP 2.0.1
Negative scaling of the text object / parent will likely cause issue with the SDF Scale. I believe I might have improved upon this in the latest releases but I would suggest to avoid using negative scale on text objects.
Note that new SSD (Screen Space Derivative) versions of the TMP SDF shaders have been introduced in the latest preview releases. These SSD shaders no longer SDF Scale to be passed to the shaders but this comes at a performance cost. On Desktop, this performance difference is not really measurable but on older mobile devices, the shader is 2.5 to 3X slower than the non SSD which is why passing SDF scale was initially used.
1 Like