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

Bug XR Toolkit: Objects Have Transparent Cutouts When Moving Head (Possible URP Shader Issue)

Discussion in 'VR' started by Bee_Sting, Jul 19, 2023.

  1. Bee_Sting

    Bee_Sting

    Joined:
    Jun 11, 2021
    Posts:
    3
    Hello,

    I am developing a VR game and within a couple days in have encountered a shader/object transparency render problem. Whenever I tilt my head with the XR Rig in my Oculus, objects in front of my water shader have transparency to skybox pixels for a couple of seconds before "re-aligning".

    Any help on this issue would be greatly appreciated. A picture will be provided.

    Thanks!

    upload_2023-7-19_13-53-50.png
     
  2. Bee_Sting

    Bee_Sting

    Joined:
    Jun 11, 2021
    Posts:
    3
    FYI: This is Unity 2022.3.4
     
  3. DarkSoulsBoss2

    DarkSoulsBoss2

    Unity Technologies

    Joined:
    Mar 24, 2023
    Posts:
    16
    Can you share which shaders you are using? It could help us determine the source of the problem.
     
  4. Bee_Sting

    Bee_Sting

    Joined:
    Jun 11, 2021
    Posts:
    3
    UPDATE: The water shader was a modified version of a 3rd party Shader Graph made by Jettelly, however, I found that wasn't the problem. Nonetheless, I'll still share them for your investigation.

    The problem turned out to be latent depth tests which had to be from a messed up setting in my project's Universal Render Pipeline settings. I came to this conclusion because after re-making a new URP project with a fresh new URP asset, the same water shader I used above was imported and it produced no "skybox shadow" effects.

    For now, I am still moving forward with the project's schedule, but if I have time at the end I'll go back and see what precisely caused my issue.
     

    Attached Files: