See through shader for AR Scenes

Hello Community,

I am trying to create a cut-out of the face region of my 3D model so the user can see his face in the camera background. Does somebody know of a shader that bypasses all the 3D objects in the scene and goes straight to the camera background?

I am using AR Foundation, the AR Camera Background Script and URP.

Thanks

You can use the shader provided by Unity. Create a new material and select the shader under VR/SpatialMapping/Occlusion or Universal Render Pipeline/VR/SpatialMapping/Occlusion depending on your render pipeline. Remember that objects in front of your geometry will still be rendered.

1 Like

Thanks you. That worked.

1 Like