2d background, pixel perfect

Okay, me again with the same problem of getting pixel perfect 2d images…

My final screen size will be 640x480. I’ve defined an orthographic 2D camera set up to a 240 orthographic size, so I then create a plane of 64x48 units size, then assign a material with my background image.

From what I gather, shouldn’t I be getting a pixel perfect 2D image if I run my game in 640x480? I definitely don’t, I disabled mipmaps and filtering (set point filtering) and I can see the image being somewhat interpolated (my oblicuous borders have gaps, I don’t know how to explain it).

Besides, I want to make several layers of 2D planes so that my character walks behind them (i.e. behind a table which is in a closer range than my character), so I take that part of the image, then create a transparent texture with only that part, create a plane the size of the texture, then assign it to it, and it looks slightly different than the same image in the background.

any advice?

Screen cap of what I mean by the image being interpolated, notice the lines are not straight

336722--11810--$test_2010_07_01_12_23_02_95_155.jpg

I’ve tried this solution with no better results…

I had a long fight with pixel perfecion too. I took the mipmaps off and no compression. Did all the correct stuff with ortho camera sizing being half the screen height and so on and so on. I also tried various “in the middle of the texel/pixel”-tryouts with no success.

Eventually it was down to one simple thing: Use only power of two textures.

^^^ This was very helpful, thanks. It looks like NPOT uncompressed textures are resized at runtime only using a different resampling method than when selecting NPOT Scale options in the editors. This resampling actually causes blurring similar to bilinear filtering. So there’s an option to just select Scale To Larger in the editor and eat the additional storage cost for true pixel-perfect background textures. I imagine that it’s all the same in memory when it gets uploaded to the hardware anyway.

Thanks a lot! This topic solved my issue with ex2D:
http://forum.unity3d.com/threads/101811-ex2D-the-best-2D-sprite-solution-for-Unity-RELEASED?p=885219&viewfull=1#post885219