/// <summary> /// Update AR screen material with camera texture size data /// (and distortion parameters if using distortion post-process filter). /// </summary> /// <param name="uOffset">U texcoord offset.</param> /// <param name="vOffset">V texcoord offset.</param> /// <param name="colorCameraRDisplay">Rotation of the display with respect to the color camera.</param> private static void _MaterialUpdateForIntrinsics( float uOffset, float vOffset, OrientationManager.Rotation colorCameraRDisplay) { Vector2[] uvs = new Vector2[4]; uvs[0] = new Vector2(0 + uOffset, 0 + vOffset); uvs[1] = new Vector2(0 + uOffset, 1 - vOffset); uvs[2] = new Vector2(1 - uOffset, 0 + vOffset); uvs[3] = new Vector2(1 - uOffset, 1 - vOffset); for (int i = 0; i < 4; ++i) { uvs[i] = _GetUnityUvBasedOnRotation(uvs[i], colorCameraRDisplay); } VideoOverlayProvider.SetARScreenUVs(uvs); }