top of page

On this Page

Occlusion Set Up



Docs       Manual       Reference       Changelog       Main Site


Occlusion & Effects

Occlusion Set Up

  1.  Set up Phantom Scene (See: Setup Guide)

  2. On the ARFoundation Game Object, find the RGB Camera Component (ARFoundation -> AR Session Origin -> RGB Camera)


  3. Attach the “Merge Depth Maps” Component to the Camera.

  4. On the Merge Depth Maps component
    a.  In the Unify Depth variable slot, find and attach the shader named “UnifyDepth” (Path: “Hidden/PhantomTech/UnifyDepth”)
    b.  Set the LidarRange variable to match the device you are building for. (Recommended: 5 for Android, 7 for iOS)


  5. ​Attach the “Occlusion” Component to the RGB Camera.

  6. On the Occlusion Component
    a.  In the “Occlusion Shader” variable slot, find and attach the shader named “Occlusion” (Path: “Hidden/PhantomTech/Occlusion”)


To test Occlusion is working, in both the Merge Depth Maps component, and the Occlusion component, you can set a test image to see occlusion in your scene.


Occlusion will only work on objects with shaders that write depth data to the ZBuffer. Transparent shaders will not be occluded.

Occlusion Set Up
bottom of page