コード例 #1
0
    void PrepareCameras()
    {
        // clear
        this.cameraDataList.Clear();

        if (Pvr_UnitySDKRender.Instance.StereoRenderPath == StereoRenderingPathPico.SinglePass)
        {
            if (Pvr_UnitySDKEyeManager.Instance.BothEyeCamera == null)
            {
                Debug.LogWarning("BothEye Camera is null!");
                return;
            }

            EyeMaskData data = new EyeMaskData();
            data.eyeSide = Eye.BothEye;
            data.camera  = Pvr_UnitySDKEyeManager.Instance.BothEyeCamera;
            this.cameraDataList.Add(data);
        }
        else
        {
            if (Pvr_UnitySDKEyeManager.Instance.LeftEyeCamera == null || Pvr_UnitySDKEyeManager.Instance.RightEyeCamera == null)
            {
                Debug.LogWarning("LeftEye or RightEye Camera is null!");
                return;
            }

            EyeMaskData data_L = new EyeMaskData();
            data_L.eyeSide = Eye.LeftEye;
            data_L.camera  = Pvr_UnitySDKEyeManager.Instance.LeftEyeCamera;
            data_L.cmdBuf  = null;
            this.cameraDataList.Add(data_L);

            EyeMaskData data_R = new EyeMaskData();
            data_R.eyeSide = Eye.RightEye;
            data_R.camera  = Pvr_UnitySDKEyeManager.Instance.RightEyeCamera;
            data_R.cmdBuf  = null;
            this.cameraDataList.Add(data_R);
        }
    }
コード例 #2
0
 void RemoveCameraCommandBuffer(EyeMaskData data)
 {
     // remove commadbuffer
     data.camera.RemoveCommandBuffer(CameraEvent.BeforeForwardOpaque, data.cmdBuf);
 }
コード例 #3
0
 void AddCameraCommandBuffer(EyeMaskData data)
 {
     data.camera.AddCommandBuffer(CameraEvent.BeforeForwardOpaque, data.cmdBuf);
 }