oculus-samples / Unity-DepthAPI

Examples of using Depth API for real-time, dynamic occlusions
Other
192 stars 24 forks source link

normal based depth occlusion #35

Closed alfiolocastro closed 5 months ago

alfiolocastro commented 5 months ago

I would like to achieve a normal based depth occlusion so that you can, for instance, render something behind a wall or roof that would be elsewhere occluded, any advice?

TudorJude commented 5 months ago

Could you please go into more detail? I'm having a bit of trouble visualizing what you mean.

alfiolocastro commented 5 months ago

Sure! I'll make a simple example: imagine I'll want to open a hole in the ground only and the material shader is a depth api custom shader. Right now the hole in the ground and every mesh (sharing the same shader) under the ground level would be occluded. Passing a normal parameter we could say to the depth api to ignore occlusion in a direction (the ground normal in the example).

TudorJude commented 5 months ago

Hey, so this problem is rather non-trivial and we have it on our todo list. Once we have something, I'll update this thread.