Search Unity

Blue outline around sprites when background is dark - iPhone X

Discussion in '2D' started by KriYorDev, Mar 5, 2019.

  1. KriYorDev

    KriYorDev

    Joined:
    Oct 3, 2017
    Posts:
    32
    The situation is like this.

    When I test my unity 2D game on my iPhone X, all background and sprite elements on the screen have a blue "halo" when moving my character. I have explored the issue with transparency on mobile, but the issue seems really strange. I have only a few sprites and 3 background parallax levels. I believe they are up to standard for mobile and it's just two "mountain" type of sprites and a black static background behind everything. And for the last three days, I am trying to fix this issue. The very strange thing is that the blue halo appears only when the background is near black. Anything brighter and it is absolutely fine. So I doubt it's a transparency issue given that it appears only with when a dark background is present.

    I have tried:
    Changing all kinds of settings on the Camera and UI camera. Optimize my sprites as much as possible. Removed all backgrounds and left just the black one. Tried removed all backgrounds and had my camera have a solid color. Made atlases to reduce drawcalls. Tried using Quads with the image instead of sprites. Tried Quads with a dark material. I tried with Mobile materials, as well as the Unlit Transparent and Unlit Transparent Cutout. Even changed the project from gamma from linear just to try that. Played with mipmaps. Tried PNG and JPEG alternatives of my sprites. So far only fixes are to use bright backgrounds or bright sprites, but that would be a huge problem for my projects in mind. I cannot have a darker background and a slightly brighter sprite in front. Removing transparency also reduces the problem, but does not remove it. The blue outlines remains around the sprite edges, but visibly less than with transparent sprites.

    Any help or direction will be helpful as I am clueless. I tried to make a video, but the problem is visible only on mobile. The recording doesn't have the blue outline around the sprites. I am just confused. The issue is not present on my Android device.

    UPDATE: I tried to upload a screenshot. What I received in the screenshot preview on iOS was interesting. Again the bug is not visible on a still screenshot, however, when I zoom in and out on it in screenshot preview mode on iOS, the blue outline appears again around the dark sprites. This is now outside the Unity system. This points me to believe it is not a Unity problem, but rather my phone. The blue outline appears when a dark sprite/object is in front of a darker background.


    Thank you!
     
    Last edited: Mar 6, 2019