Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Sprite appears over object when it's obscured

Discussion in 'General Graphics' started by _secluder_, Jul 29, 2015.

  1. _secluder_

    _secluder_

    Joined:
    Jun 18, 2013
    Posts:
    10
    Hi there,

    we've encountered a bug that's preventing us from shipping our game. For some reason, there's a white sprite that appears on certain iOS devices anytime an object is obscured by another object.

    In thisfirst image, you see the ship approaching a bridge.

    upload_2015-7-28_15-55-43.png

    And as the ship goes under the bridge, a white sprite appears. This happens anytime the ship is obscured by another object!

    upload_2015-7-28_15-56-12.png

    Here's some additional info:

    Unity Version: 5.1.0f3
    XCode: 6.4

    During our tests, we found that this bug occurs on:
    - iPhone 6 (iOS 8.4)
    - iPhone 6 plus (iOS 8.4)
    - iPad Air 2 (iOS 8.4)

    But it doesn't happen on:
    - iPhone 5s (iOS 8.2)
    - iPad Mini (iOS 8.4)
    - PC builds are fine, this is purely an iOS issue.

    Also strange is that if the shadows are disabled, this problem goes away!

    We tried enabling/disabling everything we could think of but nothing seems to work. And this white sprite doesn't exist anywhere in our build. It only seems to be happening on newer iOS devices.

    Thanks for any help!
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,782
    Random guess - It looks like a visible reflection probe. Do you have a reflection probe attached to the ship?
     
  3. _secluder_

    _secluder_

    Joined:
    Jun 18, 2013
    Posts:
    10
    Thanks for your suggestion but we're not using any reflection probes.
     
  4. smd863

    smd863

    Joined:
    Jan 26, 2014
    Posts:
    293
    Although I can't really guess what the specific issue causing this could be, it looks like your issue is limited to A8 devices so it could be a bug with the GPU driver. Might not be able to do much until Apple fixes it except explicitly disable shadows for the affected devices.

    You could look at which graphics API each build is using. The bug may be limited to a certain graphics API (like Metal or ES3.0), and forcing the device to use a different one may avoid it. You can check out this thread here, if you haven't already, to see how to tweak the API selection.
     
    theANMATOR2b likes this.
  5. _secluder_

    _secluder_

    Joined:
    Jun 18, 2013
    Posts:
    10
    Thanks for your reply, CaptainScience. That's a good idea except we can't really ship this game without shadows - the gameplay depends on it.

    The one thing I should have pointed out is that we're using a Legacy Shader ("Legacy Shaders/Self-Illumin/Specular") instead of the Standard shader only because of how much of a framerate boost it gives us on older iOS devices.

    Reverting back to the Standard shader makes this problem go away but then we also loose our rock solid 60fps.

    Someone suggested that we disable the HDR effect on the Camera to see what happens. When we did that (still with the legacy shader), the big white sprite went away and was replaced with a very small square, a few pixels across.

    So now we have a decision to make: loose our HDR effect and live with this small square anytime the ship gets obscured by another model or revert back to the Standard shader and loose our 60fps framerate on lower end devices.

    We'll probably go with the former.
     
unityunity