Class VARJOEnvironmentDepthEstimation
This extension provides a mechanism for enabling depth estimation of the environment in the runtime-supplied compositor. This is an extension to ENVIRONMENT_BLEND_MODE_ALPHA_BLEND mode to not only use the color but also depth for composition of the final image.
Mixed reality applications might want to mix real and virtual content based on the depth information for proper occlusion. XR hardware and runtime may offer various ways to estimate the depth of the environment inside the compositor. When this estimation is enabled, the compositor can generate properly occluded final image when layers are submitted with depth information (both XR_KHR_composition_layer_depth and XR_VARJO_composition_layer_depth_test).
This extension defines a new function, SetEnvironmentDepthEstimationVARJO, which can be used to toggle environment depth estimation in the compositor. Toggling depth estimation is an asynchronous operation and the feature may not be activated immediately. Function can be called immediately after the session is created. Composition of the environment layer follows the rules as described in XR_VARJO_composition_layer_depth_test.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe extension name.static final intThe extension specification version. -
Method Summary
Modifier and TypeMethodDescriptionstatic intxrSetEnvironmentDepthEstimationVARJO(XrSession session, boolean enabled) Enable or disable environment depth estimation functionality.
-
Field Details
-
XR_VARJO_environment_depth_estimation_SPEC_VERSION
public static final int XR_VARJO_environment_depth_estimation_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_VARJO_ENVIRONMENT_DEPTH_ESTIMATION_EXTENSION_NAME
The extension name.- See Also:
-
-
Method Details
-
xrSetEnvironmentDepthEstimationVARJO
Enable or disable environment depth estimation functionality.C Specification
The
SetEnvironmentDepthEstimationVARJOfunction is defined as:XrResult xrSetEnvironmentDepthEstimationVARJO( XrSession session, XrBool32 enabled);Valid Usage (Implicit)
- The
XR_VARJO_environment_depth_estimationextension must be enabled prior to callingSetEnvironmentDepthEstimationVARJO sessionmust be a validXrSessionhandle
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
session- anXrSessionhandle previously created withCreateSession.enabled- a boolean that specifies whether depth estimation functionality should be activated. Compositor will disable depth estimation functionality if environment blend mode is notENVIRONMENT_BLEND_MODE_ALPHA_BLENDand will enable the functionality when environment blend mode is set toENVIRONMENT_BLEND_MODE_ALPHA_BLEND.
- The
-