Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
bigmans's avatar
bigmans
Explorer
2 years ago

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?

1 Reply

Replies have been turned off for this discussion
  • 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.