24 Debug.LogError(
"camera is required.");
29 const float HololensV1PixelHeight = 720f;
30 const float HololensV1FieldOfView = 17.15f;
31 const float HololensV1PixelsPerDegree = (HololensV1PixelHeight / HololensV1FieldOfView);
33 float pixelsPerDegree = (camera.pixelHeight / camera.fieldOfView);
49 float unclampedScaleFactor = Mathf.Sqrt(HololensV1PixelsPerDegree / pixelsPerDegree);
51 const float MinimumScaleFactor = 0.1f;
52 const float MaximumScaleFactor = 10f;
54 scaleFactor = Mathf.Clamp(unclampedScaleFactor, MinimumScaleFactor, MaximumScaleFactor);
57 Debug.AssertFormat(unclampedScaleFactor == scaleFactor,
58 "Usability scale factor got clamped from {0} to {1}. Are we calculating HMD characteristics correctly?",