Search Unity

[LWRP][Android] Linear color space looks very different on different devices

Discussion in 'General Graphics' started by WendelinReich, Mar 29, 2019.

  1. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    215
    Hi devs,

    I just tested linear color space rendering with a default scene (standard skybox, one object) using Unity 2019.1 beta 8 and the latest LWRP. I noticed that the result looks very different on my two devices (a Galaxy S6 and a Pixel XL 1st gen). It's clearly wrong on the Pixel, with colors appearing much darker and more saturated. This difference disappears when switching back to Gamma space.

    Will post #issue id once it's sent to me. Cheers /Wendi
     
  2. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    215
    Bug report is found here.
     
  3. sophiepeithos

    sophiepeithos

    Joined:
    Sep 10, 2014
    Posts:
    24
    on 2018.3 with lwrp 4.10 preview linear space rendering is ok, so why this is a gpu driver problem?
     
  4. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    215
    Apparently it's rendered OK on some devices but not others. Here's the response I got to my bug report a few weeks ago:

    Thanks a lot for reporting the issue.

    The issue is known to be a GPU drivers bug, which is out of our hands to fix.
    The issue's public link can be found here:

    https://issuetracker.unity3d.com/issues/android-linear-color-space-causes-darker-scene-rendering-than-expected
    If you stil lhave questions, feel free to contact us again!

    Best regards,
    Vaidas M
    QA Team
     
  5. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    862
    @WendelinReich The issue that the QA team linked is a wrong one, sorry for that.
    I'll let you know when it's fixed.
     
    WendelinReich likes this.
  6. stefan-velnita

    stefan-velnita

    Joined:
    Oct 28, 2015
    Posts:
    2
    @aleksandrk Hi, any news with progress on this?

    Thanks.
     
  7. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    862
    A fix is already in 2019.2 (2019.2.0a15), 2019.1 will have it soon :)
     
  8. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    862
    2019.1.4f1 will have a fix for this.
     
    WendelinReich likes this.
  9. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    215
    Does that mean that linear color space (with LWRP) will be supported and recommended on all Android devices? (That's quite a crucial issue for us, it's not too late for us to change from gamma to linear but it soon will be.)
     
  10. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    862
    Only on those that provide hardware support for it. :)
    OpenGL ES 3 devices and higher do.
    If you're targeting any devices that only support OpenGL ES 2, you have to stick to gamma.
     
    WendelinReich likes this.
  11. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    215
    Thanks! Only 1/5 of phones still don't support OpenGL ES 2, so we'll go with 3...
     
  12. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    862
    I think it's even less than that (if you meant phones that don't support ES3) :)
     
  13. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    215
    Oops, typo ;)
    According to Google, it's currently at 21% (which also means that it's decreasing quite fast), see https://developer.android.com/about/dashboards/
     
  14. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    735
    Just wanted to chime in and say we are having this issue too. The game looks the same with Vulkan (Linear), Vulkan (Gamma) and OpenGL3 (Gamma). But when we swap to OpengGL3 (Linear), everything just looks 'darker'.
     
  15. dreyyy07

    dreyyy07

    Joined:
    May 7, 2017
    Posts:
    8
    I'm definitely still experiencing this issue with 2019.1.4f
    The first Image attached shows the difference in UI elements in the editor and my Xperia Z3. I was able to reproduce this bug by testing on other devices;
    Xperia Z3 - ‎OpenGL ES 3.0 - Bugged
    S7 edge - OpenGL ES 3.1 AEP - Bugged
    Pixel 2/3 - ‎OpenGL ES 3.2 - Working fine

    Second Image is very different as both lighting and ui elements are much darker, this just the basic LWRP project with android platform

    Third image is the logcat log from launching my actual project Screenshot (66).png Screenshot_20190527-032037.png Screenshot (68).png
     
    stefan-velnita and WendelinReich like this.
  16. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    862
    Hi!
    We just tried reproducing this on a device with Adreno 330, and the results looked correct.
    Can you please submit a bug report?
    Thanks!
     
  17. dreyyy07

    dreyyy07

    Joined:
    May 7, 2017
    Posts:
    8
    I have. Waiting to see what happens now. I'm going to try to install ubuntu to see if i can reproduce it there too.
    EDIT: Yup, same thing...
     
    Last edited: May 29, 2019
  18. Mastaroth

    Mastaroth

    Joined:
    Dec 20, 2014
    Posts:
    7
    Can confirm that this problems persists with any unity 2019 version + any version of the LWRP package ... However, in unity 2019.1.4f1, using vanilla RP + Blit Type always returns the correct colors....
     
    Prodigga likes this.
  19. dreyyy07

    dreyyy07

    Joined:
    May 7, 2017
    Posts:
    8
    How did you set the Blit type to always? Mine is greyed out...
     
    novicecode and yinyuewei like this.
  20. yinyuewei

    yinyuewei

    Joined:
    Aug 16, 2018
    Posts:
    1
    i have the sample problem 2019.1.8f1, i cannot change blit type, i think it is not a gpu error. another apk is good
     
  21. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    862
    Blit type is greyed out when an SRP is active.
     
  22. Abruzzi

    Abruzzi

    Joined:
    Feb 6, 2015
    Posts:
    14
    Hi! I have the same problem on GLES3 android with Linear. I have some track about it: there is two problems, I think(please Unity check my info).
    1) In LWRP package
    2) In Post-Process package
    First of all, if you create default project with for example 2019.3.0a8 with default LWRP package(6.5.2) and default PP package(2.1.4) and build scene(check GLES3) it should be darker on Android, but if you turn off Post-Process Layer on main camera and Post-Process Volume and build again -> it should works fine. BUT Next point very important: Update LWRP to 6.7.1+(or 6.9.0) then you will get always darker scene in build even if PP Layer and Volume turned off. And also in the same time you got a new PP 2.1.6+(or 2.1.7) and if you turn it on then you will get fully broken render(it just cant render scene you can see only UI but all 3D will glitch).

    p.s. you also will get error after update LWRP to 6.7.1+ on 2019.3.0a8 about UnityEngine.Experimental.VFX.VFXManager.ProcessCamera(camera); just delete "Experimental" to fix that

    all of that I've tested on my device Samsung Galaxy Note 3 with adreno 330

    And yeah, this is problem not only on Unity 2019.3, first time I've got this issue on 2019.2 when update to LWRP 6.7.1, but issue with Post-Process was all-time for me, I can't make it work right on GLES3 :)

    Thanks
     
    Emanx140 likes this.
  23. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    87
    Have the same issue on 2019.3.0a8 with LWRP 7.0.0
     
  24. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    862
    This all sounds like there's a new bug related to linear color space. Can someone please report it?
     
  25. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    87
    Done
     
    Emanx140 and Abruzzi like this.
  26. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    862
    Thanks a lot!
     
  27. Abruzzi

    Abruzzi

    Joined:
    Feb 6, 2015
    Posts:
    14
    Is there a link to issuetracker. Thanks!
     
  28. onurerler

    onurerler

    Joined:
    Apr 10, 2013
    Posts:
    12
    For 2019.1 it's in planned state. Please apply this fix for 2019 asap. After strange togglegroup bug, we are now waiting for this bug to upgrade to 2019 :(
     
  29. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    862
    I'm not sure I follow.
     
  30. jonasj_unity

    jonasj_unity

    Unity Technologies

    Joined:
    Jul 4, 2018
    Posts:
    4
  31. jonasj_unity

    jonasj_unity

    Unity Technologies

    Joined:
    Jul 4, 2018
    Posts:
    4
    Mind I ask, what version of Unity are you using? :)
     
  32. onurerler

    onurerler

    Joined:
    Apr 10, 2013
    Posts:
    12
    my unity version is 2019.1.10

    If graphic api is openGLES3 and color space is Linear; scenes still rendering much darker on some devices.
    (for example : samsung galaxy J7 max)
     
  33. onurerler

    onurerler

    Joined:
    Apr 10, 2013
    Posts:
    12
    In 2019.1.12 scenes are still rendering much darker on samsung galaxy j7max. Is there any good news about that.???

    I couldn't try vulkan because device doesn't support vulkan.
     
  34. Emanx140

    Emanx140

    Joined:
    Jan 13, 2017
    Posts:
    3
    Same on the new version 2019.2. LWRP 6.9.1.
    on Xiaomi RedMi 4A(Adreno 308), HTC One M7 (Adreno 320). All using OpenGLES3. Using Vulkan (Galaxy S8) all works OK. All without any Post-Proces.

    In my game, I use a Camera to take in-game screenshots and they appear darker too. Even if I take screenshots using editor. Maybe it somehow related.
    I used code from here: https://docs.unity3d.com/ScriptReference/Camera.Render.html
     
    onurerler likes this.
  35. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    87
  36. onurerler

    onurerler

    Joined:
    Apr 10, 2013
    Posts:
    12
  37. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    87
    It says the fix is in Review, can't wait!
    upload_2019-8-11_21-18-38.png
     
  38. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    441
  39. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    862
    Sure, but we need to land it to 7.x first :)
     
    optimise likes this.
  40. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    215
    Of course, it's only going to work once this bug (1136069) is fixed as well, which right now wrecks my and other people's Unity editor (2019.2.1f1, two days old, installed with JDK option and no other Java environment on my system) when switching to Linear color space for Android.

    I'll light a candle the day I'm finally able to switch to linear on Android...
     
    onurerler likes this.
  41. bomul0327

    bomul0327

    Joined:
    Oct 2, 2015
    Posts:
    12
    This problem happens at 2018.3.0f2 and 2018.4.7f1 without using LWRP. Any possible solution?
     
  42. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    862
    Please check if Blit type in Player settings is set to Auto or Always. If this doesn't work, please submit a bug report.
     
    bomul0327 likes this.
  43. AkselSky

    AkselSky

    Joined:
    Dec 3, 2015
    Posts:
    2
    Hi! My 2 cents ..
    Untitled.png
    Screenshot.png
    Thanks)
     
  44. bomul0327

    bomul0327

    Joined:
    Oct 2, 2015
    Posts:
    12
    This doesn't worked for me. I'll send a bug report.
    Anyway Thanks!
     
  45. bomul0327

    bomul0327

    Joined:
    Oct 2, 2015
    Posts:
    12
    I found a simple solution, but it's not good for performance I guess.
    Turn off "Use 32-bit display buffer" this option. I don't think this is a good solution, but it's ok for testing looks in android.
     
  46. AkselSky

    AkselSky

    Joined:
    Dec 3, 2015
    Posts:
    2
    Unfortunately, the same even with "Use 32-bit display buffer" turn off
    Screenshot.png