Low quality textures in Unity

Hi,

I have a problem with textures in Unity 2D project. Everything is blurred, no matter what I do, to prevent that.
It’s a problem with filter modes in Unity, because there is no any good filter mode, suitable for 2d game.
The only advice I found on the internet is to set point filter, but it’s good only for textures without transparency.
I use “power of 2” size textures, but it doesn’t do anything. The quality in XNA and Direct 9 is much better.
To give you a proof, I attach an image, where you can see the problem which I described here.
As you can see bilinear is very blurred, point also don’t provide good quality.

Is there any way to use in Unity 2D textures without annoying blur?
Will be thankfull if someone from Unity team tell more about this case.

It looks to me like you’re significantly reducing the size of the texture in Unity compared to the original.

–Eric

I didn’t reduce size of any texture. All images are the same size, but Unity bilinear filter automatically blurs it.
I’m not a first person who complain about:
http://answers.unity3d.com/questions/183084/how-can-i-prevent-my-texture2d-filter-mode-from-re.html
http://answers.unity3d.com/questions/602721/sprite-filtering-pointbilinear.html

Below I attach 2 screenshots (one is zoomed) from orginal Unity 2D demo project. As you can see the same texture in Unity looks worse than orginal image, because is blurred. This effect is much easier to notice if you use a very detailed textures.


Now I would like to show you a better example, with more detailed textures. It’s really easy to see the difference.

It means that I can’t do good looking game in Unity, without using sharpening filters.
However it requires Unity Pro, but why should I use sharpening if it must looks good without any tricks.

Below I include a link to the test project, where you image quality in Unity, and check my settings.
https://www.dropbox.com/s/a1siy2xge6fd81e/Unity_Blur_Textures.zip

This project is set to 1280x720 resolution, so you should run it in widnow mode (in 1280x720). No matter if I use “power of 2” size textures or not, image is always blurred.

Additionally I attach images to compare and project settings.
Original texture:

Bilinear in Unity:

Texture settings:
1628273--100087--$img_set.png

Camera settings:
1628273--100089--$cam_set.png

I hope this thread won’t be abandoned. It’s a shame that Unity based on Directx 9 generates quality worse than Directx 9 itself.

I’m hoping 4.5 will fix these issues. We had multiple bugs in 4.3 which might be contributing to what you’re seeing. One is that the mesh generated for the sprites has sub-pixel errors. Try working around this by setting mesh type to Full Rect - see advanced texture importer mode.

Hmm… I downloaded your project and ran it. The only change I made was to the screen size, it was set at 800x600, I changed it to 1280x720 (so the image wouldn’t be scaled.)
It came out identical. No difference at all (well, a very tiny color variance, but no blurring). Here:


Here is a close up:

Can you tell which is the original, and which is Unity?

Are you displaying them in Unity at full screen size (1280x720)? Maybe a video card issue?

zombiegorilla makes a valid point - if you scale your texture, it will become blurry.

Camera size 3.6 so it is 1280x720.
Unity 4.3.3 free version.
GTX 460

My screen:

zombiegorilla your screen is ok, but how to change screen size to display image correctly?
It was tested on 3 different pc, and it’s blurred.

Sorry for my bad english.

All I did was set the aspect drop down to 1280x720 (click the + button to add it).

1628431--100128--$Screen Shot 2014-05-15 at 5.19.14 AM.png

Looks also better when enable: [×] pixel snap

(create new material, use sprite shader, assign to that test image)

1628433--100129--$pixel_snap.png

Pixel snap looks very good

edit:
Sprite- default Pixel snap work ok, but Sprite-diffuse not work.
Are there any options that allow Sprite-diffuse Pixel snap work?

Pixel snap works perfectly with sprites-default shader. However it didn’t work with sprites-diffuse, textures still were blurred.
In my opinion it’s problem with one additional pixel line, that Unity generates on left and top edge of the screen.

1628907--100183--$snap_off.png

This pink color is a background, that shouldn’t be visible. If pixel snap is ON, pink lines disappear.

These lines make problem with bilinear filtering. I made one little improvement to Sprite-diffuse shader and
now my textures in Unity looks perfectly, the same as orginal textures. I tested it on Windows, Web Player and Android.

#if defined(PIXELSNAP_ON)  !defined(SHADER_API_FLASH)
	//v.vertex = UnityPixelSnap (v.vertex);

	v.vertex.x -= 0.005f;	// my improvement
	v.vertex.y += 0.005f;   // my improvement
#endif

Don’t know if it works on other platform.

I hope in 4.5 version it will be corrected, and no others tricks will be needed.
Thanks all for help.