WVR_SetProjectedPassthroughAlpha

WVR_EXPORT WVR_Result WVR_SetProjectedPassthroughAlpha(float alpha)

Function to set the alpha for the projected passthrough.

This function must be called after calling WVR_RenderInit().

Version
API Level 7
Note
Supported from Runtime version 7 or higher (certain devices only).
Parameters
  • alpha: Set the alpha for the projected passthrough.
Return Value
  • WVR_SUCCESS: The setting is valid.
  • WVR_Error_RuntimeVersionNotSupport: This feature is supported from Runtime version 7 or higher.
  • WVR_Error_FeatureNotSupport: This feature is not supported on this device.

How to use

The following example sets the alpha for the projected passthrough by pressing button A:

#include <wvr/wvr_system.h>

void pollEvent() {
    if (event.common.type == WVR_EventType_ButtonUnpressed) {
        if (event.input.inputId == WVR_InputId_Alias1_A) {
            float alpha = 0.8f;
            WVR_SetProjectedPassthroughAlpha(alpha);
            WVR_ShowProjectedPassthrough(true);
        }
    }
}