- Home /
About MipMaps problem.
Dear Unity Users,
We are desinging a user interface for our game, Recently we have come across a problem with our GUITexture element. We imported a png file with alpha and unticked Generate Mip Maps option but the texture in game is not sharp and seem like a low quality import. we have attached the original image , an ingame screentshot of the mentionent texture and out import settings. We have tried using various formats but failed to impruve the quality of the texture.
Any help is greatly appreciated.

Thank you in advance Grcan SERBEST
Answer by Grcan SERBEST · Jan 07, 2011 at 09:47 PM
Thank you for all answering. The problem has been solved, it was indeed a resizing problem, choosing " ToLarger" has worked like a charm. Krobill's answer as that and this was the correct answer. I want share the solution with you.
If image doesn't have dimensions that are a power of 2, by default Unity will resize it for you. On our screenshot it's the combo box non power of 2 with the 'to nearest' option selected. This means your texture may have been resized to a lower resolution and is stretched on screen to fit the desired size.
Your options are : - Prevent this resizing, but it's always a good thing to use power of 2 dimensions since it's more hardware friendly - Choose 'To Larger' to allow the resizing but one without loss of data - Resize yourself your texture to a power of 2 dimension which is in fact recommended most of the time.
Thanks again for the quick reply.

Regards.
Answer by Tetrad · Jan 07, 2011 at 09:04 PM
Looks like compression artifacting. Change the texture format to RGBA32 or something like that instead of automatic compressed or dxt5 or whatever you have it set to.
Also, is your texture actually a power of two? Maybe turn off the NPOT stretching?
Hello Tetrad,
The image format is currently ARGB 32 bit no luck so far...I do not know how to turn on or off the NPOT stretching, please if you could elaborate on that. The texture we are using is at its original size ingame so there should be no stretching if I understand it correctly. Our code is; GUI.DrawTexture (Rect(altbar1520yan,altbar1520dik,1520,363),altbar1520);
Answer by Moxon · Jan 07, 2011 at 09:15 PM
How are you drawing the texture?
If you happen to be using a GUI.Label() to draw the texture it adds padding and it distorts images and generally makes them look fuzzy (in my experience).
Try using GUI.DrawTexture() instead and see if that helps.
Hello $$anonymous$$oxon ,
We already use GUI.DrawTexture when drawing texture...
Thank you
Answer by Jason B · Jan 07, 2011 at 09:40 PM
Have you toyed around with the filter mode of the texture? Bilinear filtering will, by default, tend to slightly smudge the pixels around to attain some slight softness in textures. It's ideal to not filter your UI textures at all though if you want them to be in the exact way you originally drew them.
Your answer
Follow this Question
Related Questions
Keeping texture quality when Quality Settings change 0 Answers
MIP Maps - uGUI 0 Answers
How to disable mipmaps? 1 Answer