Search Unity

Texture Distortion on Windows Standalone but not on Mac

Discussion in 'Editor & General Support' started by highlyinteractive, May 7, 2014.

  1. highlyinteractive

    highlyinteractive

    Joined:
    Sep 6, 2012
    Posts:
    116
    I've been struggling with some 2D textures which are ever so slightly distorted when published to a Windows Standalone, but perfectly fine on a Mac OS X Standalone:

    $arrows.jpg

    My setup is an orthographic camera with quads set to the texture size. I'm running both platforms at fullscreen 1920x1080 with no texture compression texture mode set to GUI. It doesn't seem to make a difference if the textures are sized power-of-two or not. (edit: but it does make a difference if the quad AND texture is power-of-two)

    Unity is version 4.3.0f4 and I'm publishing both platforms as 64-bit


    Has anyone else run into this problem? Am I missing something obvious, or could this be an issue with Unity itself?
     
    Last edited: May 7, 2014
  2. highlyinteractive

    highlyinteractive

    Joined:
    Sep 6, 2012
    Posts:
    116
    Update:

    I've put together a test here: https://www.dropbox.com/sh/8opl3z4ef80omyc/yNIhRmEiuc

    I have a 500x500 png on a 500x500 quad and a 512x512 png on a 512x512 quad. Shader is a standard unlit. Textures are set to GUI.

    It looks like if I set the filter mode to Point, anything that is non-power-of-two gets distorted. If I set it to bilinear or trilinear it goes soft and fuzzy.


    So unless anyone has a better idea, my best option is to manually expand every texture to power-of-two ratios and place them on power-of-two scaled quads.

    Unless anyone has a better idea? Please?
     
  3. Deleted User

    Deleted User

    Guest

    I assume that you want pixel perfect rendering eg. your cameras ortho height is set to the resolution height and your quads set to its texture resulution?!
    If so, the position of your objects matters!
    I'm not an expert at this field but as far as I know Windows uses a half pixel offset, wich means that if some object is at position 1, 4 on a mac, it should be at 1.5, 4.5 on Windows (to be pixel perfect with this method) .

    Dont quote me on that but give it a try
     
  4. highlyinteractive

    highlyinteractive

    Joined:
    Sep 6, 2012
    Posts:
    116
    Brilliant, that worked!

    I'm both upset and ecstatic that the solution was that simple. Thanks for the help :)