Search Unity

URP to support Android below v5

Discussion in 'Universal Render Pipeline' started by SamTyurenkov, Dec 7, 2019.

  1. SamTyurenkov

    SamTyurenkov

    Joined:
    May 12, 2018
    Posts:
    95
    Hi there, I recently switched from built-in render to a Universal Rendering Pipeline in attempt to support as many devices as possible.

    I understand that for good performance I have to switch off shadows/bake shadows and in general set a lower resolution for most of the settings.

    However, even with the lowest graphics settings, when I upload my build to Google Play and visit Testing Tab there, I can see that there is no graphics on older Androids. Isn't URP supposed to work for them out of the box? If not how can I fix that?



    I suppose resolution and shadows actually should just make performance worse, but what exactly might be causing such a blank screen?
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
    Hi!
    Can you please report a bug an list the devices where you see that?
    Thanks!
     
  3. SamTyurenkov

    SamTyurenkov

    Joined:
    May 12, 2018
    Posts:
    95
    @aleksandrk Thanks for suggestion, I think this is related to Open GL ES 2, rather than Android version. I guess I have to disable some player settings, but I'm not sure which ones exactly. I don't think this is a bug though, just requires some tuning.

    I already found that I have to disable GPU skinning (Compute skinning).
    Maybe you know something else that breaks rendering on OpenGL es 2?

    Here some errors from logcat:


    Code (CSharp):
    1. 12-14 10:34:09.098: E/Unity(3161): [EGL] eglChooseConfig(m_EGLDisplay, configAttribs, NULL, 0, &eglConfigCount): EGL_BAD_ATTRIBUTE: An unrecognized attribute or attribute value was passed in the attribute list.
    2. 12-14 10:34:09.098: E/Unity(3161): (Filename: ./Runtime/GfxDevice/egl/ConfigEGL.cpp Line: 422)
    3. 12-14 10:34:09.098: E/Unity(3161): [EGL] eglChooseConfig(m_EGLDisplay, configAttribs, NULL, 0, &eglConfigCount): EGL_BAD_ATTRIBUTE: An unrecognized attribute or attribute value was passed in the attribute list.
    4. 12-14 10:34:09.098: E/Unity(3161): (Filename: ./Runtime/GfxDevice/egl/ConfigEGL.cpp Line: 422)
    5. 12-14 10:34:09.098: E/Unity(3161): [EGL] eglChooseConfig(m_EGLDisplay, configAttribs, NULL, 0, &eglConfigCount): EGL_BAD_ATTRIBUTE: An unrecognized attribute or attribute value was passed in the attribute list.
    6. 12-14 10:34:09.098: E/Unity(3161): (Filename: ./Runtime/GfxDevice/egl/ConfigEGL.cpp Line: 422)
    7. 12-14 10:34:09.098: E/Unity(3161): [EGL] eglChooseConfig(m_EGLDisplay, configAttribs, NULL, 0, &eglConfigCount): EGL_BAD_ATTRIBUTE: An unrecognized attribute or attribute value was passed in the attribute list.
    8. 12-14 10:34:09.098: E/Unity(3161): (Filename: ./Runtime/GfxDevice/egl/ConfigEGL.cpp Line: 422)
    9. 12-14 10:34:09.098: E/Unity(3161): [EGL] eglChooseConfig(m_EGLDisplay, configAttribs, NULL, 0, &eglConfigCount): EGL_BAD_ATTRIBUTE: An unrecognized attribute or attribute value was passed in the attribute list.
    10. 12-14 10:34:09.098: E/Unity(3161): (Filename: ./Runtime/GfxDevice/egl/ConfigEGL.cpp Line: 422)
    11. 12-14 10:34:09.098: E/Unity(3161): [EGL] eglChooseConfig(m_EGLDisplay, configAttribs, NULL, 0, &eglConfigCount): EGL_BAD_ATTRIBUTE: An unrecognized attribute or attribute value was passed in the attribute list.
    12. 12-14 10:34:09.098: E/Unity(3161): (Filename: ./Runtime/GfxDevice/egl/ConfigEGL.cpp Line: 422)
     
    Last edited: Dec 14, 2019
  4. SamTyurenkov

    SamTyurenkov

    Joined:
    May 12, 2018
    Posts:
    95
  5. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
    Compute skinning should have no effect on that, it's ignored if the device has no support (as is with GLES2).
    Are there any shader-related errors in the logcat output?
     
  6. SamTyurenkov

    SamTyurenkov

    Joined:
    May 12, 2018
    Posts:
    95
    @aleksandrk yeah, I shared some unity shaders error in the link I shared above. It seems this bug is already being tracked.
     
  7. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
    that's errors when building, not from a device.
     
  8. SamTyurenkov

    SamTyurenkov

    Joined:
    May 12, 2018
    Posts:
    95
    @aleksandrk Well, I tried to upload development build to Google Play, to see the errors, but it seems Unity doesn't sign development builds, and google doesn't allow unsigned upload? On my personal device there are no errors.

    If I upload release build, than those lines above are the only errors in logcat:


    Code (CSharp):
    1. 12-14 10:34:09.098: E/Unity(3161): [EGL] eglChooseConfig(m_EGLDisplay, configAttribs, NULL, 0, &eglConfigCount): EGL_BAD_ATTRIBUTE: An unrecognized attribute or attribute value was passed in the attribute list.
    2. 12-14 10:34:09.098: E/Unity(3161): (Filename: ./Runtime/GfxDevice/egl/ConfigEGL.cpp Line: 422)
    3. 12-14 10:34:09.098: E/Unity(3161): [EGL] eglChooseConfig(m_EGLDisplay, configAttribs, NULL, 0, &eglConfigCount): EGL_BAD_ATTRIBUTE: An unrecognized attribute or attribute value was passed in the attribute list.
    4. 12-14 10:34:09.098: E/Unity(3161): (Filename: ./Runtime/GfxDevice/egl/ConfigEGL.cpp Line: 422)
    5. 12-14 10:34:09.098: E/Unity(3161): [EGL] eglChooseConfig(m_EGLDisplay, configAttribs, NULL, 0, &eglConfigCount): EGL_BAD_ATTRIBUTE: An unrecognized attribute or attribute value was passed in the attribute list.
    6. 12-14 10:34:09.098: E/Unity(3161): (Filename: ./Runtime/GfxDevice/egl/ConfigEGL.cpp Line: 422)
    7. 12-14 10:34:09.098: E/Unity(3161): [EGL] eglChooseConfig(m_EGLDisplay, configAttribs, NULL, 0, &eglConfigCount): EGL_BAD_ATTRIBUTE: An unrecognized attribute or attribute value was passed in the attribute list.
    8. 12-14 10:34:09.098: E/Unity(3161): (Filename: ./Runtime/GfxDevice/egl/ConfigEGL.cpp Line: 422)
    9. 12-14 10:34:09.098: E/Unity(3161): [EGL] eglChooseConfig(m_EGLDisplay, configAttribs, NULL, 0, &eglConfigCount): EGL_BAD_ATTRIBUTE: An unrecognized attribute or attribute value was passed in the attribute list.
    10. 12-14 10:34:09.098: E/Unity(3161): (Filename: ./Runtime/GfxDevice/egl/ConfigEGL.cpp Line: 422)
    11. 12-14 10:34:09.098: E/Unity(3161): [EGL] eglChooseConfig(m_EGLDisplay, configAttribs, NULL, 0, &eglConfigCount): EGL_BAD_ATTRIBUTE: An unrecognized attribute or attribute value was passed in the attribute list.
    12. 12-14 10:34:09.098: E/Unity(3161): (Filename: ./Runtime/GfxDevice/egl/ConfigEGL.cpp Line: 422)
     
  9. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
    Well, this is why I asked for a bug report. Our QA can check on multiple devices and see if there are errors there.
     
  10. SamTyurenkov

    SamTyurenkov

    Joined:
    May 12, 2018
    Posts:
    95
    Hmm, I commented this void and it started working: