Mixed Reality with Varjo XR plugin

Note: you are currently viewing documentation for a beta or an older version of Varjo

Developing mixed reality applications for XR-1 Developer Edition is quick and easy with the Varjo XR plugin. Follow these simple instructions to get started. Once you have set up the Varjo plugin (see Getting Started with the Varjo plugin for Unity page) there are a couple of additional steps to complete.

The Varjo XR plugin settings can be found in the Project Settings dialog. Under the XR Plug-in Management tab, select Varjo and disable the Opaque option.

When using the HDRP mode, you need to modify the settings to make sure you are using a color buffer format with an alpha channel. In the Project Settings dialog, select the Quality tab and under HDRP settings select the HD Render Pipeline Asset. Set the Color Buffer Format dropdown to R16G16B16A16.

Add the following line of code to one of your scene initialization routines:


When this setting is enabled, you will see the image from the video pass-through cameras when your application renders 0 in the color buffer. You can do this by using a stencil mask or you can make the camera clear to 0. For the latter, set the camera’s Background Type to Color and set RGBA(0,0,0,0) as the color.