Search Unity

Sprite Rendering Question

Discussion in '2D' started by Goupi, May 27, 2015.

  1. Goupi

    Goupi

    Joined:
    May 27, 2015
    Posts:
    9
    Hello! I created a 16bit sprite and I'm having trouble rendering it into my game.
    Here iswhat my sprite looks like in game and my import settings.
    upload_2015-5-26_17-6-27.png

    And here is what its supposed to look like.
    upload_2015-5-26_17-7-13.png

    How can I fix my weird blending issues?
    Thanks!
     
  2. ColossalPaul

    ColossalPaul

    Unity Technologies

    Joined:
    May 1, 2013
    Posts:
    174
    Hi,

    As a first step, I would disable compression on the texture. Avoid using lossy compression (like dxt). And disable mipmaps.

    After that, I would examine how might the point sampling mess it up, usually just make sure that we don't leave it up to the hardware to sample points across colors (when it needs to decide which pixels on images goes to the pixel on screen).

    Let me know how it goes.
     
    theANMATOR2b likes this.
  3. Goupi

    Goupi

    Joined:
    May 27, 2015
    Posts:
    9
    Thanks for replying!

    I'm not really sure where I should disable compression. I went into photoshop and limited my texture down to only a few colors and that didn't really help.
     
  4. Goupi

    Goupi

    Joined:
    May 27, 2015
    Posts:
    9
    Nevermind! In photoshop I enlarged my sprite from 16x16 to 64x64 and its works fine!
     
  5. ColossalPaul

    ColossalPaul

    Unity Technologies

    Joined:
    May 1, 2013
    Posts:
    174
    Hi,

    More precisely, I meant don't use lossy compressed formats DXT. If you switch to full color (in the texture properties), you ensure that all pixels gets into the game.

    In your case, bigger texture helps, but the real problem was you lost some pixels due to lossy compression.