Pixel Perfect TextMeshPro Text artifacts

This is the scene view:


And this is the game veiw:

I’ve been working on a 3x5 text font asset (TextMeshProUGUI component with Mesh Renderer) for a project with a pixel perfect camera. The pixel perfect setup uses two cameras, a render texture and raw-image canvas renderer setup instead of the built in component, so I can apply post processing effects at max resolution and subtle sub-pixel screenshake and such. (Help yourself to the code and setup by the way if you’re interested)

This is not simply due to the font size being so small. This effect occurs even if the text’s size matches perfectly with the pixels-per-unit of the camera
Additionally, I have tried applying a small offset to the text, which works occasionally, but requires tweaking depending on the text being displayed which makes this not feasible for a fully-fledged game.

Here’s a download for a unitypackage reproducing the problem (You may need to import cinemachine and change the dither material to sprites-default):
https://www.dropbox.com/scl/fi/r9lv9dbns7877s0ov991q/TMP3x5PixelPerfectFont.unitypackage?rlkey=6zfm2mv7mobrf191rcq5f6pbk&st=e9vmj1v7&dl=0

How can I get rid of this effect to get consistent pixel-perfect text? Does it have something to do with the mesh renderer component? Some funny business with the way Unity Renders text?
Any help would be greatly appreciated

Hi Robinhood, I tried downloading the project, but I got an error, can you try to re-upload or check the URL?

Hm, I didn’t seem to have any trouble re-downloading. What kind of error are you getting?

1 Like

try removing all the data that is not needed inside the project. there is no need for this to be 1Gb download

can you post a screen of the texture that has the font letters inside? the atlas?

disregard, I had my antitracker on and some websites don’t like that enabled, haha.

I changed the download to a unitypackage, though you may need to import cinemachine. Heres the texture I used:

For anybody having this problem, its because the font atlas was at a high resolution (1024x1024) instead of the minimum size for me it was (64x64)
Follow this tutorial https://www.youtube.com/watch?v=Ov2XR81oVcI