docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Occlusion samples

    Occlusion samples demonstrate AR Foundation Occlusion functionality. You can open these samples in Unity from the Assets/Scenes/Occlusion folder.

    Tip

    You can check which platforms support AR Foundation Occlusion features by checking the Occlusion platform support page.

    Simple occlusion scene

    The Simple Occlusion scene demonstrates occlusion of virtual content by real world content through the use of environment depth images on supported devices.

    Depth images scene

    The Depth Images scene demonstrates raw texture depth images from different methods.

    HMD occlusion scene

    The HMDOcclusion scene demonstrates how to use AR Foundation occlusion with shaders, as described in AR Shader Occlusion component. You can use this sample on a head-mounted display with an OpenXR runtime.

    Hands occlusion scene

    The HandsOcclusion scene demonstrates how to use occlusion with hand meshes as the occlusion source. Refer to AR Shader Occlusion component for more information.

    Meta occlusion scene

    The MetaOcclusion scene implements soft occlusion on Meta Quest devices. Access this sample from Assets/Scenes/Meta. Refer to the OpenXR Meta Occlusion documentation to learn more about occlusion on Meta Quest.

    Shader samples

    Unity provides sample shaders that you can use with the AR Shader Occlusion component for soft occlusion in your app.

    You can access the shader samples for soft occlusion from Assets/Shaders/Occlusion.


    Apple and ARKit are trademarks of Apple Inc., registered in the U.S. and other countries and regions.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)