Blend Control Mask API

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

General

The Blend Control Mask API allows a client to submit a masking layer that is used to control the blending between video see-through and application layer images.

Blend Control Mask can be used to extend or restrict the chroma-key mask or to control the depth testing against the estimated video depth. The mask layer can be provided either with the main application layer or as a separate rendering application for masking alone.

Masking modes:

Restricted Show the video pass-through image (VST) in the mask. Can be used with chroma key.

Extended Show VR in the mask. Can be used with chroma key.

Extended Show VR in the mask and chroma elsewhere. Requires chroma key.

Depth Test or VST Perform video depth test in the mask and show the video pass-through image (VST) elsewhere. Requires video depth test.

Depth Test or VR Perform video depth test in the mask and show VR elsewhere. Requires a video depth test.

Example

See MaskingTool in the examples folder of the experimental SDK for information on how to implement masking in your own client application. The example application shows how to render the mask to the texture buffer and submit it to Varjo Compositor, either to mask the video pass-through image or to restrict or extend the chroma key mask. The example application uses simple plane shapes, but you can easily extend it to render more complex shapes. For optimal performance, it is preferred to submit the blend control mask from the rendering VR application rather than from a separate process.

Chroma Key Masking API

The Blend Control Mask API deprecates the previously available experimental Chroma Key Masking API.