Search Unity

Resolved Black Artifacts in Skybox - Android/Quest

Discussion in 'General Graphics' started by VincentTAIC, May 10, 2021.

  1. VincentTAIC

    VincentTAIC

    Joined:
    Sep 17, 2020
    Posts:
    4
    Hi,
    I am currently working on a VR application and after the upgrade from Unity 2019.3.15f1 to Unity 2021.1.4f1 we experience strange black artifacts in the skybox.
    These artifacts only occur in the build on the device, in the editor everything looks fine. The artifacts flicker in and out - only visible for a frame or two.



    Its linked to the skybox shader - using solid color solves the issue but is no option since we need a skybox.

    I have disabled/reenabled MSAA, HDR in the settings without any success.
    We currently use OpenGLES3 as Graphics API and use linear color space.

    Does anyone have had the same issue and could give me a hint on how to solve this issue?

    I already have asked the same in the answers section but have not yet received any replies - so to increase the reach of my question I created this thread.
    https://answers.unity.com/questions/1834932/black-artifacts-in-skybox-androidquest.html
     
  2. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,364
    What is the camera near and far view distances ?

    This looks like a clipping of polygons due to range, also check if there is anything between the skybox and your camera.

    Note that after upgrading my projects to Unity 2021.1.6f1, i got a myriad of strange issues, HDRP 11 pipeline not fully working with some of my shaders (while HDRP12 does), strange script errors that did not occur before and many other problems, so 2021.1 generally is a great risk to use, as seems has multiple bugs and is still in some pre-Beta stage, even though they released as final.

    Unity does these fast untested releases for PR purposes, but i would stay away from new releases for some months to a year to start working with them seriously.
     
  3. VincentTAIC

    VincentTAIC

    Joined:
    Sep 17, 2020
    Posts:
    4
    Hi nasos_333,
    thanks for your reply.

    The cameras current clipping planes are set to:
    near - 0.02
    far - 3000

    So I guess that should work as intended.
    And in a normal use case there will be objects between the camera and the skybox but I also disabled all objects except the camera / playerObject and the issue still persisted.

    Changing the cameras clear flags to anything but Skybox the artifacts are gone - I think its linked to how the skybox shader is applied somehow.
    Currently we are using a custom skybox shader but I also changed it to different skybox shaders - either from unity or created by myself.
     
  4. VincentTAIC

    VincentTAIC

    Joined:
    Sep 17, 2020
    Posts:
    4
    So after nasos_333 mentioned the clipping planes I did some more testing with the values and the issue was indeed caused by it.
    I reduced the far clipping plane to be 1000 and that fixed the issue.

    Thanks for your help :)
     
    nasos_333 likes this.
  5. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,364
    Np, i have seen this pattern so many times with some of my cloud systems that was easy to make an assumption :)