cancel
Showing results for 
Search instead for 
Did you mean: 

Quest 3 depth API + shader graph

bigmans
Explorer

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 1

M100FAT
Explorer

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.