Why 2d camera is not pixel perfect

I am making a 2d project for web player. Web player dimensions are 900600. I created a texture 150600 to make a left menubar, but when i place it on the scene it does not fill my scene vertically. Can somebody tell me why? I use standard unity 4,3 2d projet settings.

Unity isn’t designed for pixel perfect rendering. You can achieve it, but you have to set things up to remove artifacts (sample rate errors).

Some things to look at:

  • You will likely need a texture with “power of 2” dimensions, e.g. 512 by 1024.
  • Texture filter mode should be “point”
  • Turn off texture compression
  • If you are using Unity Sprite texture type, take care with your sprite pixels to units setting
  • Take care with your orthographic camera scale relative to your screen dimensions

Please google for details on the last two items. There is some math involved. Here’s one lead: http://forum.unity3d.com/threads/210329-Unity-4-3-Tips-amp-Workarounds?p=1415249&viewfull=1#post1415249

If you want the orthographic camera to match your screen resolution, then set the camera Size to be half of your screen height. So, in this case, if your window is 600 pixels, set your camera Size value to be 300.

PS. for pixel perfect text you might want to check out my Pixel-Perfect Dynamic Text asset: Pixel-Perfect Dynamic Text by Strobotnik (for Unity®)