// OnPreRender is called once per camera each frame void OnPreRender() { // on pre render is where projection matrix and pixel rect are set up correctly (for each camera individually) // so we use this to acquire this data. if (IsLeft && !mLeftCameraDataAcquired) { // at start matrix can be undefined if (!VuforiaRuntimeUtilities.MatrixIsNaN(mLeftCamera.projectionMatrix)) { mLeftCameraMatrixOriginal = mLeftCamera.projectionMatrix; mLeftCameraPixelRect = mLeftCamera.pixelRect; mLeftCameraDataAcquired = true; } } else if (!mRightCameraDataAcquired) { // at start matrix can be undefined if (!VuforiaRuntimeUtilities.MatrixIsNaN(mRightCamera.projectionMatrix)) { mRightCameraMatrixOriginal = mRightCamera.projectionMatrix; mRightCameraPixelRect = mRightCamera.pixelRect; mRightCameraDataAcquired = true; } } }