- Home /
GUI Texture blur
Hi I made a game instruction graphic(has text on it), and attached it as GUI Texture to show it on screen, but text looks blurry. How can I avoid this? And also is there a better way to show an instruction graphic on screen?(I mean if I am not using GUI Texture, what else can I do?) Thanks very much
EDIT:
It should look like the first picture, but after I create a GUI Texture, the shape of the graphic is changed, and text looks blurry. Can I avoid this?
Answer by Design3.com · Jan 05, 2011 at 09:51 PM
You might have the Texture Importer texture type setting set to "Texture" instead of "GUI."
The "Texture" preset rounds the texture to a power of 2 resolution (64x64, 128x256, 256x1024, etc). You can also set it to "Advanced" and use those options to import at the texture's native resolution. You can also set the texture compression here if need be.
Answer by Eric5h5 · Dec 14, 2010 at 04:23 AM
Import the texture at a larger size. Since the instructions include graphics there's no real point using anything else, no.
Answer by ina · Dec 14, 2010 at 06:18 AM
Check if your jpg or other image has been pre-compressed. If you are using photoshop, make sure to save your jpg at maximum settings.
For instructional graphics that fill up the screen, you should try exporting graphics assets that are at least a minimal resolution for your target deployment.
You should never use jpg in any case. Even at max settings it still has compression artifacts.
Answer by jonas-echterhoff · Dec 14, 2010 at 09:21 AM
Try setting the scale of the GUITexture's transform to zero on all axes, and that the pixelInset Rect to the dimensions of the texture. That way, you will make sure that the texture is always rendered in it's own native dimensions, and not otherwise scaled on screen (this may not always be what you want, but is the best way to assure you don't get any blurry stretching in your image).
if I set the scale to zero, it will change to a different shape...
Answer by coastwise · Dec 14, 2010 at 03:27 PM
Try setting "Generate Mip Maps" to false on the Texture Importer.
After reading your update, I would suggest that you use a GUIText for the text part and only having the background image in a GUITexture.
From the manual: "$$anonymous$$ip $$anonymous$$aps are a list of progressively smaller versions of an image, used to optimise performance on real-time 3D engines. Objects that are far away from the camera use the smaller texture versions. Using mip maps uses 33% more memory, but not using them can be a huge performance loss. You should always use mipmaps for in-game textures; the only exceptions are textures that will never be $$anonymous$$ified (e.g. GUI textures)."
You should be able to find the checkbox in the Inspector if you select the texture asset in your project panel (not the GUITexture in the hierarchy)