Search Unity

Graphics.Blit not working on iPhone 6S Plus (Black Screen)

Discussion in 'Image Effects' started by Biggix, Aug 31, 2016.

  1. Biggix

    Biggix

    Joined:
    Dec 8, 2014
    Posts:
    44
    I was working on implementing a fullscreen blur solution for mobiles. It works fine on all iOS devices that I have (iPad Air, iPhone 5) except for iPhone 6S Plus, where the same code gives a black screen. I managed to narrow it down to the following code:

    Code (CSharp):
    1. using UnityEngine;
    2. [ExecuteInEditMode]
    3. [RequireComponent(typeof(Camera))]
    4. public class BlitTest : MonoBehaviour
    5. {
    6.     void OnRenderImage(RenderTexture source, RenderTexture destination)
    7.     {
    8.         Graphics.Blit(source, destination);
    9.     }
    10. }
    When I place this script on the main camera, all devices work fine (slowish of course) but I get the black screen specifically on iPhone 6S Plus. I do not know whether this also applies to the iPhone 6 Plus because I don't have this device.

    I use Forward rendering path and Antialiasing turned off, IL2CPP.

    This seems to be a Unity bug - waiting for your considerations and advice!
     
  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    That seems really bad and also weird. What version of unity are you using and this just started happening for you?
     
  3. Biggix

    Biggix

    Joined:
    Dec 8, 2014
    Posts:
    44
    Hi Tim, thank you for the reply. I'm using the latest official (5.4.0f3) and I just stumbled upon this. I can't say whether this could take place before or not.

    It would be great if anyone who has iPhone 6 Plus / 6S Plus could check this code on their part and confirm the black screen happening.

    --UPDATE--

    So I just tried adding an image effect that 100% worked fine across all iOS devices when I was using Unity 5.3.4f1 - that is BloomPro. Now it gives the black screen on iPhone 6S Plus! Other iOS devices work fine. So I presume this is definitely a Unity bug.
     
    Last edited: Sep 1, 2016
  4. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Okay. Can you raise a bug with this scene. I'll get the ios team to look into it.
     
  5. Biggix

    Biggix

    Joined:
    Dec 8, 2014
    Posts:
    44
    Hi TIm,

    I raised a bug ticket (828265_fgkveddboadcdj5q) but since it was my first bug submission ever, I thought it would be ok to submit it from home (running 5.3.5), however the bug is definitely present in 5.4.0f3 (not sure about 5.3.5), do I have a submit a new bug from 5.4.0f or it's ok like that?
     
  6. VOTRUBEC

    VOTRUBEC

    Joined:
    Dec 17, 2014
    Posts:
    106
    I hate reviving old threads, but I'm now having the same issue.

    I have the Blur image effect added to a camera. The effect works as intended on my Android device, my iPhone4s and my iPhone6s. The effect FAILS on my iPad Air2.

    I ran the iPhone 6s app with Metal. I should have also been able to run it using Metal on the iPad Air2. I tried to revert to GLES3. Which produces a long list of errors with the new Post Processor Stack. I just can't win!

    Note, this is evident only on the camera when I enable the Blur filter. When the Blur filter is not enabled, the camera displays the screen correctly.

    I'd also like to bring up my previously expressed gripe that Blur has been left out of the Post Processing Stack. I can't believe that adding Blur would be such a headache, considering all of the other features (Motion Blur for example) that have already been added...?

    If Biggix is correct (and my instinct tells me he is), then whatever fix was applied must have overlooked the Air2 possibly and specifically?