private void Start()
    {
        originalOpaqueValue = VarjoRendering.GetOpaque();

        UpdateReconstructionState();
        UpdateVSTState();
    }
 void OnDisable()
 {
     videoSeeThrough        = false;
     depthEstimation        = false;
     environmentReflections = false;
     UpdateMRFeatures();
     VarjoRendering.SetOpaque(originalOpaqueValue);
 }
Exemplo n.º 3
0
 void Start()
 {
     if (mixedReality)
     {
         VarjoMixedReality.StartRender();
         mixedRealityEnabled = true;
         originalOpaqueValue = VarjoRendering.GetOpaque();
         VarjoRendering.SetOpaque(false);
     }
 }
 public void UpdateVSTState()
 {
     if (vstEnabled)
     {
         VarjoRendering.SetOpaque(false);
         VarjoMixedReality.StartRender();
     }
     else
     {
         VarjoRendering.SetOpaque(true);
         VarjoMixedReality.StopRender();
     }
 }
 void UpdateDepthEstimation()
 {
     if (depthEstimation != depthEstimationEnabled)
     {
         if (depthEstimation)
         {
             depthEstimation           = VarjoMixedReality.EnableDepthEstimation();
             originalSubmitDepthValue  = VarjoRendering.GetSubmitDepth();
             originalDepthSortingValue = VarjoRendering.GetDepthSorting();
             VarjoRendering.SetSubmitDepth(true);
             VarjoRendering.SetDepthSorting(true);
         }
         else
         {
             VarjoMixedReality.DisableDepthEstimation();
             VarjoRendering.SetSubmitDepth(originalSubmitDepthValue);
             VarjoRendering.SetDepthSorting(originalDepthSortingValue);
         }
         depthEstimationEnabled = depthEstimation;
     }
 }
    private void Start()
    {
        originalOpaqueValue = VarjoRendering.GetOpaque();
        VarjoRendering.SetOpaque(false);
        cubemapEventListenerSet = onCubemapUpdate.GetPersistentEventCount() > 0;
        HDCameraData            = xrCamera.GetComponent <HDAdditionalCameraData>();

        if (!m_skyboxProfile.TryGet(out volumeSky))
        {
            volumeSky = m_skyboxProfile.Add <HDRISky>(true);
        }

        if (!m_skyboxProfile.TryGet(out volumeExposure))
        {
            volumeExposure = m_skyboxProfile.Add <Exposure>(true);
        }

        if (!m_skyboxProfile.TryGet(out volumeVSTWhiteBalance))
        {
            volumeVSTWhiteBalance = m_skyboxProfile.Add <VSTWhiteBalance>(true);
        }
    }
Exemplo n.º 7
0
    void Update()
    {
        if (Input.GetKeyDown(MixedRealityToggle))
        {
            mixedReality = !mixedReality;
        }

        if (mixedReality != mixedRealityEnabled)
        {
            if (mixedReality)
            {
                VarjoMixedReality.StartRender();
                originalOpaqueValue = VarjoRendering.GetOpaque();
                VarjoRendering.SetOpaque(false);
            }
            else
            {
                VarjoMixedReality.StopRender();
                VarjoRendering.SetOpaque(originalOpaqueValue);
            }

            mixedRealityEnabled = mixedReality;
        }
    }
 private void OnDisable()
 {
     VarjoRendering.SetOpaque(originalOpaqueValue);
 }