Skip to main content
New Participant
December 3, 2023

Quest 3 depth API + shader graph

I see Meta provide 4-5 different shaders for the depth API

https://github.com/oculus-samples/Unity-DepthAPI

but what about for custom shader graph shaders? I use these a lot

is there something simple we can do in shader graph to enable compatibility with the depth API?

    This topic has been closed for replies.

    1 reply

    Participant
    February 2, 2024

    Yes, they made it very easy, you have a subgraph that you can just plug into your alpha channel. If you already have alpha channel logic I recommend putting a minimum node between your logic's output and the subshader output and putting the result of those 2 into your alpha channel. Then you get the lower value of the two. 

    It's called OcclusionSubGraph.
    See the Github page: https://github.com/oculus-samples/Unity-DepthAPI it's step nr 10.