- Home /
UI Image Distortion When Rotated
I am creating a card-building game and have recently implemented hand"curving". Everything works well but the cards (which are UI Images) are distorted when they are rotated. I have tried implementing mipmaps and increasing the transparency around the images as was suggested on other forums to fix this but still end up with the results below:
I have found that changing my UI Canvas setting from "Screen-Overlay" to "Screen-Camera" does smooth the cards as I want, however, I have created everything up to this point in "Screen-Overlay" so many other aspects become broken. I would rather not have to rework multiple systems to work with "Screen-Camera" if possible.
Any ideas on how to reduce distortion when rotating UI images? Thanks for the help!
Answer by viesc123 · May 31, 2020 at 04:27 PM
If by distortion you mean the aliasing happening on the borders of the cards, one way to get rid of it is to reduce the pixel size of the sprites. If they roughly match the pixel resolution they are displayed at in game, the aliasing is usually improved. That's what MipMaps do, but I find the algorithm in Unity often leads to mushy images that appear too soft. Keeping a bit of transparent padding at the edges helps too, because if you don't use anti-aliasing in the quality settings or as a post effect, the polygon border of the UIImages will always have some aliasing going on.