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

How to get order-independent transparency to work in VR?

Discussion in 'AR/VR (XR) Discussion' started by tuf91497, Oct 23, 2018.

  1. tuf91497

    tuf91497

    Joined:
    May 21, 2018
    Posts:
    13
    I'm using [https://github.com/candycat1992/OIT_Lab] this github project and Unity 2018.2.0f2 to create order independent transparency in my projects. It's working fine with a normal camera

    No OIT (order-dependent transparency/ODT):


    Working OIT:
    It doesn't want to embed this gfy but here's the link:


    But, when I try to use it with a VR setup, it just doesn't render any object on the "transparent" layer that is using the above project to create OIT.

    VR without OIT:
    It doesn't want to embed this gfy so here's the link:


    VR not working with OIT:


    On top of just not rendering anything marked as transparent, the left and right cameras become offset in a way that they shouldn't, so you get a disorienting effect as if your eyes are in the wrong place.

    I was occassionally getting a weird effect where the spheres would render all black and remain centered on my left eye, and the rest of the scene was rendered upside down. The right eye would render everything not marked as transparent correctly. I believe I was using the single camera setting in the OVR camera rig when this happened, but I couldn't get it to produce the same error when I went back to record these errors.

    I'm using the Oculus SDK, but I don't think it has to do with that. The same thing happens if I just use a camera that feeds to the Oculus headset.

    [https://drive.google.com/file/d/1fuzA4I67qC-8dX5Z4aMS0_1G9LgvEJVz/view?usp=sharing] here is the Unity project I was using, if you want to see for yourself.

    Any information would be appreciated, thank you.
     
    Last edited: Oct 23, 2018
  2. olidepalma

    olidepalma

    Joined:
    Mar 30, 2020
    Posts:
    2
    Hi!
    I'm having the same problem. Have you find any solution?
    Thanks!