Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

[SOLVED] Far clip issues with URP Lit shaders in VR

Discussion in 'AR/VR (XR) Discussion' started by gfbeach, Aug 12, 2020.

  1. gfbeach

    gfbeach

    Joined:
    May 19, 2015
    Posts:
    9
    I'm building some large outdoor environments for use with Oculus Quest and I'm noticing a pretty annoying bug with the standard URP-complaint Lit/Simple Lit shaders. Whatever the far plane distance is set to, anything using the aforementioned shaders will only draw out to roughly half that distance. Text Mesh Pro objects and other types of shaders (including things I've made in Shader Graph) seem to work okay. Objects render if I set their material's render mode to "transparent", but this can introduce other problems and thus isn't really a solution. Any ideas on how to get the Lit/Simple Lit shaded objects to behave?

    Unity 2019.3.15f1
    URP 7.3.1
     
  2. gfbeach

    gfbeach

    Joined:
    May 19, 2015
    Posts:
    9
    After some tinkering it seems to be an issue with having a skybox in the scene (Lighting -> Skybox Material); deleting the skybox makes everything appear properly... ... ...except now I don't have a skybox. It looks like the skybox was occluding everything farther away than roughly half of the camera's far clip plane, which falls under a different problem entirely.
     
    Last edited: Aug 12, 2020
  3. ThomasZeng

    ThomasZeng

    Unity Technologies

    Joined:
    Jun 24, 2019
    Posts:
    78
  4. gfbeach

    gfbeach

    Joined:
    May 19, 2015
    Posts:
    9
    Thank you for checking in on this! In the meantime I've made a Skybox shader graph using cubemaps that works well enough.
     
    ThomasZeng likes this.