28 #include "../OVR_SensorFusion.h"
30 namespace OVR {
namespace Util {
namespace Render {
54 default:
OVR_ASSERT (
false );
return "Error";
break;
72 default:
OVR_ASSERT (
false );
return "Error";
break;
98 if ( pTanHalfFovOverride !=
NULL )
100 fov = *pTanHalfFovOverride;
115 Sizei const actualRendertargetSurfaceSize,
116 Sizei const requestedRenderedPixelSize,
117 bool bRendertargetSharedByBothEyes,
118 bool bMonoRenderingMode =
false )
120 Recti renderedViewport;
121 if ( bMonoRenderingMode || !bRendertargetSharedByBothEyes || (eyeType ==
StereoEye_Center) )
124 renderedViewport.
x = 0;
125 renderedViewport.
y = 0;
126 renderedViewport.
w =
Alg::Min ( actualRendertargetSurfaceSize.
w, requestedRenderedPixelSize.
w );
127 renderedViewport.
h =
Alg::Min ( actualRendertargetSurfaceSize.
h, requestedRenderedPixelSize.
h );
132 renderedViewport.
x = 0;
133 renderedViewport.
y = 0;
134 renderedViewport.
w =
Alg::Min ( actualRendertargetSurfaceSize.
w/2, requestedRenderedPixelSize.
w );
135 renderedViewport.
h =
Alg::Min ( actualRendertargetSurfaceSize.
h, requestedRenderedPixelSize.
h );
138 renderedViewport.
x = (actualRendertargetSurfaceSize.
w+1)/2;
141 return renderedViewport;
147 Sizei const &actualRendertargetSurfaceSize,
148 bool bRendertargetSharedByBothEyes,
149 float desiredPixelDensity = 1.0f,
150 bool bMonoRenderingMode =
false )
152 OVR_ASSERT ( actualRendertargetSurfaceSize.
w > 0 );
153 OVR_ASSERT ( actualRendertargetSurfaceSize.
h > 0 );
159 actualRendertargetSurfaceSize,
161 bRendertargetSharedByBothEyes, bMonoRenderingMode );
166 Recti const &renderedViewport,
167 Sizei const &actualRendertargetSurfaceSize )
172 eyeToSourceNDC, renderedViewport, actualRendertargetSurfaceSize );
180 Sizei const &actualRendertargetSurfaceSize,
181 Recti const &renderedViewport,
182 bool bRightHanded =
true,
float zNear = 0.01f,
float zFar = 10000.0f,
183 bool bMonoRenderingMode =
false,
184 float zoomFactor = 1.0f )
188 float fovScale = 1.0f / zoomFactor;
192 zoomedFov.
UpTan *= fovScale;
207 result.
Eye = eyeType;
223 StereoEye eyeType,
bool bmonoRenderingMode)
227 if (!bmonoRenderingMode)
243 return virtualCameraOffset;
251 bool bRendertargetSharedByBothEyes,
252 float pixelDensityInCenter )
254 Sizei idealPixelSize[2];
255 for (
int eyeNum = 0; eyeNum < 2; eyeNum++ )
263 distortionAndFov.
Fov,
264 pixelDensityInCenter );
268 result.
w =
Alg::Max ( idealPixelSize[0].w, idealPixelSize[1].w );
269 result.
h =
Alg::Max ( idealPixelSize[0].h, idealPixelSize[1].h );
270 if ( bRendertargetSharedByBothEyes )
279 Sizei const &actualRendertargetSurfaceSize,
280 bool bRendertargetSharedByBothEyes,
282 float zNear ,
float zFar ,
283 Sizei const *pOverrideRenderedPixelSize ,
284 FovPort const *pOverrideFovport ,
288 if ( pOverrideFovport !=
NULL )
290 distortionAndFov.
Fov = *pOverrideFovport;
294 if ( pOverrideRenderedPixelSize !=
NULL )
296 viewport =
CalculateViewportInternal ( eyeType, actualRendertargetSurfaceSize, *pOverrideRenderedPixelSize, bRendertargetSharedByBothEyes,
false );
302 distortionAndFov.
Fov,
303 actualRendertargetSurfaceSize, bRendertargetSharedByBothEyes, 1.0f,
false );
309 distortionAndFov.
Fov,
310 actualRendertargetSurfaceSize, viewport,
311 bRightHanded, zNear, zFar,
false, zoomFactor );
317 bool bMakeFovSymmetrical )
321 if ( bMakeFovSymmetrical )
336 Sizei const &actualRendertargetSurfaceSize,
337 Recti const &renderViewport )
343 Sizei const &actualRendertargetSurfaceSize,
344 Sizei const &requestedRenderSize,
345 bool bRendertargetSharedByBothEyes )
352 Sizei const &actualRendertargetSurfaceSize,
354 bool bRendertargetSharedByBothEyes )
445 static const UByte eyeParamIndices[3] = { 0, 0, 1 };
454 if ( pLensOverrideLeft ==
NULL )
463 if ( pLensOverrideRight !=
NULL )
472 bool rendertargetIsSharedByBothEyes )
483 if ( pfovLeft ==
NULL )
492 if ( pfovRight !=
NULL )
522 float pixelDensityInCenter )
555 for (
int eyeNum = 0; eyeNum < numEyes; eyeNum++ )
586 pLensOverride, pTanHalfFovOverride,
605 for (
int eyeNum = 0; eyeNum < numEyes; eyeNum++ )
616 eyeType,
Hmd, localDistortion, fov,
625 float orthoDistance = 0.8f;
626 float orthoHalfFov = tanf (
Area2DFov * 0.5f );
631 localInterpupillaryDistance = 0.0f;
634 orthoHalfFov, orthoHalfFov,
635 unityOrthoPixelSize.
x, unityOrthoPixelSize.
y,
636 orthoDistance, localInterpupillaryDistance,
673 for (
int eyeNum = 0; eyeNum < 2; eyeNum++ )
680 Recti renderedViewport;
685 eyeType, localDistortion, fov,
763 float fovScale = 1.0f / fovZoom;
767 fovPort.
UpTan *= fovScale;
797 int *pNumVertices,
int *pNumTriangles,
802 int triangleCount = 0;
808 *pNumVertices = vertexCount;
809 *pNumTriangles = triangleCount;
815 int *pNumVertices,
int *pNumTriangles,
827 if (!*ppVertices || !*ppTriangleListIndices)
833 if (*ppTriangleListIndices)
838 *ppTriangleListIndices =
NULL;
845 const float fadeOutBorderFraction = 0.075f;
849 float xOffset = 0.0f;
850 float uOffset = 0.0f;
869 sourceCoordNDC.
x = 2.0f * ( (float)x / (
float)
DMA_GridSize ) - 1.0f;
870 sourceCoordNDC.
y = 2.0f * ( (float)y / (
float)
DMA_GridSize ) - 1.0f;
878 Vector2f tanEyeAnglesR, tanEyeAnglesG, tanEyeAnglesB;
880 distortion, screenNDC );
888 switch ( shutterType )
917 float edgeFadeIn = ( 1.0f / fadeOutBorderFraction ) *
920 float edgeFadeInScreen = ( 2.0f / fadeOutBorderFraction ) *
922 edgeFadeIn =
Alg::Min ( edgeFadeInScreen, edgeFadeIn );
938 UInt16 *pcurIndex = *ppTriangleListIndices;
945 int x = ( ( triNum & 0x0001 ) >> 0 ) |
946 ( ( triNum & 0x0004 ) >> 1 ) |
947 ( ( triNum & 0x0010 ) >> 2 ) |
948 ( ( triNum & 0x0040 ) >> 3 ) |
949 ( ( triNum & 0x0100 ) >> 4 ) |
950 ( ( triNum & 0x0400 ) >> 5 ) |
951 ( ( triNum & 0x1000 ) >> 6 ) |
952 ( ( triNum & 0x4000 ) >> 7 );
953 int y = ( ( triNum & 0x0002 ) >> 1 ) |
954 ( ( triNum & 0x0008 ) >> 2 ) |
955 ( ( triNum & 0x0020 ) >> 3 ) |
956 ( ( triNum & 0x0080 ) >> 4 ) |
957 ( ( triNum & 0x0200 ) >> 5 ) |
958 ( ( triNum & 0x0800 ) >> 6 ) |
959 ( ( triNum & 0x2000 ) >> 7 ) |
960 ( ( triNum & 0x8000 ) >> 8 );
961 int FirstVertex = x * (DMA_GridSize+1) + y;
983 if ( ( x < DMA_GridSize/2 ) != ( y < DMA_GridSize/2 ) )
985 *pcurIndex++ = (
UInt16)FirstVertex;
986 *pcurIndex++ = (
UInt16)FirstVertex+1;
987 *pcurIndex++ = (
UInt16)FirstVertex+(DMA_GridSize+1)+1;
989 *pcurIndex++ = (
UInt16)FirstVertex+(DMA_GridSize+1)+1;
990 *pcurIndex++ = (
UInt16)FirstVertex+(DMA_GridSize+1);
991 *pcurIndex++ = (
UInt16)FirstVertex;
995 *pcurIndex++ = (
UInt16)FirstVertex;
996 *pcurIndex++ = (
UInt16)FirstVertex+1;
997 *pcurIndex++ = (
UInt16)FirstVertex+(DMA_GridSize+1);
999 *pcurIndex++ = (
UInt16)FirstVertex+1;
1000 *pcurIndex++ = (
UInt16)FirstVertex+(DMA_GridSize+1)+1;
1001 *pcurIndex++ = (
UInt16)FirstVertex+(DMA_GridSize+1);
1023 int *pNumVertices,
int *pNumTriangles,
1027 int vertexCount = 0;
1028 int triangleCount = 0;
1034 *pNumVertices = vertexCount;
1035 *pNumTriangles = triangleCount;
1041 int *pNumVertices,
int *pNumTriangles,
bool rightEye,
1051 if (!*ppVertices || !*ppTriangleListIndices)
1057 if (*ppTriangleListIndices)
1062 *ppTriangleListIndices =
NULL;
1069 float xOffset = 0.0f;
1070 float uOffset = 0.0f;
1087 sourceCoordNDC.
x = 2.0f * ( (float)x / (
float)
HMA_GridSize ) - 1.0f;
1088 sourceCoordNDC.
y = 2.0f * ( (float)y / (
float)
HMA_GridSize ) - 1.0f;
1094 switch ( shutterType )
1136 UInt16 *pcurIndex = *ppTriangleListIndices;
1143 int x = ( ( triNum & 0x0001 ) >> 0 ) |
1144 ( ( triNum & 0x0004 ) >> 1 ) |
1145 ( ( triNum & 0x0010 ) >> 2 ) |
1146 ( ( triNum & 0x0040 ) >> 3 ) |
1147 ( ( triNum & 0x0100 ) >> 4 ) |
1148 ( ( triNum & 0x0400 ) >> 5 ) |
1149 ( ( triNum & 0x1000 ) >> 6 ) |
1150 ( ( triNum & 0x4000 ) >> 7 );
1151 int y = ( ( triNum & 0x0002 ) >> 1 ) |
1152 ( ( triNum & 0x0008 ) >> 2 ) |
1153 ( ( triNum & 0x0020 ) >> 3 ) |
1154 ( ( triNum & 0x0080 ) >> 4 ) |
1155 ( ( triNum & 0x0200 ) >> 5 ) |
1156 ( ( triNum & 0x0800 ) >> 6 ) |
1157 ( ( triNum & 0x2000 ) >> 7 ) |
1158 ( ( triNum & 0x8000 ) >> 8 );
1159 int FirstVertex = x * (HMA_GridSize+1) + y;
1181 if ( ( x < HMA_GridSize/2 ) != ( y < HMA_GridSize/2 ) )
1183 *pcurIndex++ = (
UInt16)FirstVertex;
1184 *pcurIndex++ = (
UInt16)FirstVertex+1;
1185 *pcurIndex++ = (
UInt16)FirstVertex+(HMA_GridSize+1)+1;
1187 *pcurIndex++ = (
UInt16)FirstVertex+(HMA_GridSize+1)+1;
1188 *pcurIndex++ = (
UInt16)FirstVertex+(HMA_GridSize+1);
1189 *pcurIndex++ = (
UInt16)FirstVertex;
1193 *pcurIndex++ = (
UInt16)FirstVertex;
1194 *pcurIndex++ = (
UInt16)FirstVertex+1;
1195 *pcurIndex++ = (
UInt16)FirstVertex+(HMA_GridSize+1);
1197 *pcurIndex++ = (
UInt16)FirstVertex+1;
1198 *pcurIndex++ = (
UInt16)FirstVertex+(HMA_GridSize+1)+1;
1199 *pcurIndex++ = (
UInt16)FirstVertex+(HMA_GridSize+1);
1221 const float extraFramesOfBufferingKludge = 1.0f;
1277 Matrix4f worldFromPredictedView = (eyeViewAdjust * predictedViewFromWorld).InvertedHomogeneousTransform();
1278 Matrix4f matRenderFromNowStart = (eyeViewAdjust * renderedViewFromWorld) * worldFromPredictedView;
1299 matRenderFromNowStart.
M[0][1] = -matRenderFromNowStart.
M[0][1];
1300 matRenderFromNowStart.
M[0][2] = -matRenderFromNowStart.
M[0][2];
1301 matRenderFromNowStart.
M[1][0] = -matRenderFromNowStart.
M[1][0];
1302 matRenderFromNowStart.
M[2][0] = -matRenderFromNowStart.
M[2][0];
1303 matRenderFromNowStart.
M[1][3] = -matRenderFromNowStart.
M[1][3];
1304 matRenderFromNowStart.
M[2][3] = -matRenderFromNowStart.
M[2][3];
1306 return matRenderFromNowStart;
1311 Matrix4f worldFromPredictedView = (eyeViewAdjust * predictedViewFromWorld).InvertedHomogeneousTransform();
1312 Matrix4f matRenderXform = (eyeViewAdjust * renderedViewFromWorld) * worldFromPredictedView;
1319 for (
int i = 0; i < 2; i++ )
1381 Matrix4f visibleMatrix(visiblePose);
1382 Matrix4f renderedMatrix(renderedPose);
1389 Matrix4f visibleMatrix(visiblePose);
1390 Matrix4f renderedMatrix(renderedPose);
1405 const float fudgeFactor = 0.002f;
1443 float distortionTimeMedian = 0.0f;
1459 distortionTimeMedian = maxTime;
1466 OVR_ASSERT ( !
"Really didn't need more measurements, thanks" );
bool IsRendertargetSharedByBothEyes
struct OVR::HmdRenderInfo::ShutterInfo Shutter
Transformf GetViewRenderPredictionPose(SensorFusion &sfusion)
void HeightmapMeshCreate(HeightmapMeshVertexData **ppVertices, UInt16 **ppTriangleListIndices, int *pNumVertices, int *pNumTriangles, const StereoEyeParams &stereoParams, const HmdRenderInfo &hmdRenderInfo)
ScaleAndOffset2D EyeToSourceUV
Sizei CalculateRecommendedTextureSize(HmdRenderInfo const &hmd, bool bRendertargetSharedByBothEyes, float pixelDensityInCenter)
ViewportScaleAndOffsetBothEyes SetRenderViewport(Recti const &renderViewportLeft, Recti const &renderViewportRight)
const float OVR_DEFAULT_EXTRA_EYE_ROTATION
StereoConfig(StereoMode mode=Stereo_LeftRight_Multipass)
Matrix4f TimewarpComputePoseDeltaPosition(Matrix4f const &renderedViewFromWorld, Matrix4f const &predictedViewFromWorld, Matrix4f const &eyeViewAdjust)
StereoEyeParams StereoEye
LensConfig LensOverrideRight
Vector2f TransformTanFovSpaceToScreenNDC(DistortionRenderDesc const &distortion, const Vector2f &tanEyeAngle, bool usePolyApprox)
float PresentFlushToTimewarpStart
Recti GetFramebufferViewport(StereoEye eyeType, HmdRenderInfo const &hmd)
static const int DMA_GridSize
OVR_FORCE_INLINE const T Max(const T a, const T b)
struct OVR::HmdRenderInfo::EyeConfig EyeLeft
Transformf EyeRenderPoses[2]
ViewportScaleAndOffset ModifyRenderViewport(StereoEyeParams const ¶ms, Sizei const &actualRendertargetSurfaceSize, Recti const &renderViewport)
float VsyncToFirstScanline
ScaleAndOffset2D CreateUVScaleAndOffsetfromNDCScaleandOffset(ScaleAndOffset2D scaleAndOffsetNDC, Recti renderedViewport, Sizei renderTargetSize)
float LensSeparationInMeters
void HeightmapMeshDestroy(HeightmapMeshVertexData *pVertices, UInt16 *pTriangleMeshIndices)
struct OVR::HmdRenderInfo::EyeConfig EyeRight
ViewportScaleAndOffset ModifyRenderDensity(StereoEyeParams const ¶ms, Sizei const &actualRendertargetSurfaceSize, float pixelDensity, bool bRendertargetSharedByBothEyes)
void JustInTime_BeforeDistortionTimeMeasurement(double timeNow)
float PresentFlushToPresentFlushSeconds
LensConfig LensOverrideLeft
ViewportScaleAndOffset ModifyRenderSize(StereoEyeParams const ¶ms, Sizei const &actualRendertargetSurfaceSize, Sizei const &requestedRenderSize, bool bRendertargetSharedByBothEyes)
double NextFramePresentFlushTime
ViewportScaleAndOffset Left
DistortionRenderDesc Distortion
float DistortionTimes[NumDistortionTimes]
char const * GetDebugNameEyeCupType(EyeCupType eyeCupType)
float SetViewportPixelsPerDisplayPixel
FovPort CalculateFovFromHmdInfo(StereoEye eyeType, DistortionRenderDesc const &distortion, HmdRenderInfo const &hmd, float extraEyeRotationInRadians)
Matrix4f TimewarpComputePoseDelta(Matrix4f const &renderedViewFromWorld, Matrix4f const &predictedViewFromWorld, Matrix4f const &eyeViewAdjust)
float DistortionTimeAverage
void SetExtraEyeRotation(float extraEyeRotationInRadians=0.0f)
void SetZClipPlanesAndHandedness(float zNear=0.01f, float zFar=10000.0f, bool rightHandedProjection=true)
static StereoEyeParams CalculateStereoEyeParamsInternal(StereoEye eyeType, HmdRenderInfo const &hmd, DistortionRenderDesc const &distortion, FovPort const &fov, Sizei const &actualRendertargetSurfaceSize, Recti const &renderedViewport, bool bRightHanded=true, float zNear=0.01f, float zFar=10000.0f, bool bMonoRenderingMode=false, float zoomFactor=1.0f)
static const int HMA_NumVertsPerEye
void TransformScreenNDCToTanFovSpaceChroma(Vector2f *resultR, Vector2f *resultG, Vector2f *resultB, DistortionRenderDesc const &distortion, const Vector2f &framebufferNDC)
double GetVisiblePixelTimeEnd()
float PresentFlushToPresentFlush
Sizei CalculateIdealPixelSize(StereoEye eyeType, DistortionRenderDesc const &distortion, FovPort tanHalfFov, float pixelsPerDisplayPixel)
float MetersPerTanAngleAtCenter
Transformf GetPredictedVisiblePixelPoseEnd(SensorFusion &sfusion)
float PresentFlushToTimewarpEnd
bool RightHandedProjection
static const int HMA_GridSizeLog2
Sizei CalculateRecommendedTextureSize(bool rendertargetSharedByBothEyes, float pixelDensityInCenter=1.0f)
Matrix4f RenderedProjection
double JustInTime_GetDistortionWaitUntilTime()
float ScreenGapSizeInMeters
Transform< float > Transformf
static const int DMA_NumVertsPerEye
ViewportScaleAndOffsetBothEyes SetRenderDensity(float pixelsPerDisplayPixel)
double LastFramePresentFlushTime
Transformf GetPoseAtTime(double absoluteTime) const
DistortionRenderDesc CalculateDistortionRenderDesc(StereoEye eyeType, HmdRenderInfo const &hmd, const LensConfig *pLensOverride)
ViewportScaleAndOffset Right
void SetHmdRenderInfo(const HmdRenderInfo &hmd)
DistortionRenderDesc Distortion
Size< int > ResolutionInPixels
static const int DMA_GridSizeLog2
Transformf GetPredictedVisiblePixelPoseStart(SensorFusion &sfusion)
StereoEyeParams CalculateStereoEyeParams(HmdRenderInfo const &hmd, StereoEye eyeType, Sizei const &actualRendertargetSurfaceSize, bool bRendertargetSharedByBothEyes, bool bRightHanded, float zNear, float zFar, Sizei const *pOverrideRenderedPixelSize, FovPort const *pOverrideFovport, float zoomFactor)
bool JustInTime_NeedDistortionTimeMeasurement() const
Matrix4f GetTimewarpDeltaEnd(SensorFusion &sfusion, Transformf const &renderedPose)
Matrix4f CreateProjection(bool rightHanded, FovPort tanHalfFov, float zNear, float zFar)
void Reset(HmdRenderInfo &renderInfo, bool vsyncEnabled, double timeNow)
Vector3f CalculateEyeVirtualCameraOffset(HmdRenderInfo const &hmd, StereoEye eyeType, bool bmonoRenderingMode)
ScaleAndOffset2D EyeToSourceUV
static DistortionAndFov CalculateDistortionAndFovInternal(StereoEye eyeType, HmdRenderInfo const &hmd, LensConfig const *pLensOverride=NULL, FovPort const *pTanHalfFovOverride=NULL, float extraEyeRotationInRadians=OVR_DEFAULT_EXTRA_EYE_ROTATION)
StereoEyeParamsWithOrtho EyeRenderParams[2]
enum OVR::Util::Render::StereoConfig::SetViewportModeEnum SetViewportMode
char const * GetDebugNameHmdType(HmdTypeEnum hmdType)
static Recti CalculateViewportDensityInternal(StereoEye eyeType, DistortionRenderDesc const &distortion, FovPort const &fov, Sizei const &actualRendertargetSurfaceSize, bool bRendertargetSharedByBothEyes, float desiredPixelDensity=1.0f, bool bMonoRenderingMode=false)
static const int DMA_NumTrisPerEye
double GetVisiblePixelTimeStart()
ViewportScaleAndOffsetBothEyes setupViewportScaleAndOffsets()
void SetRendertargetSize(Size< int > const rendertargetSize, bool rendertargetIsSharedByBothEyes)
float LensDiameterInMeters
float PresentFlushToRenderedScene
const StereoEyeParamsWithOrtho & GetEyeRenderParams(StereoEye eye)
double DistortionTimeCurrentStart
void DistortionMeshCreate(DistortionMeshVertexData **ppVertices, UInt16 **ppTriangleListIndices, int *pNumVertices, int *pNumTriangles, const StereoEyeParams &stereoParams, const HmdRenderInfo &hmdRenderInfo)
void JustInTime_AfterDistortionTimeMeasurement(double timeNow)
void DistortionMeshDestroy(DistortionMeshVertexData *pVertices, UInt16 *pTriangleMeshIndices)
static const int HMA_NumTrisPerEye
ScaleAndOffset2D CreateNDCScaleAndOffsetFromFov(FovPort tanHalfFov)
static const int HMA_GridSize
void AfterPresentAndFlush(double timeNow)
PredictionValues PredictionGetDeviceValues(const HmdRenderInfo &hmdRenderInfo, bool withTimewarp, bool withVsync)
ViewportScaleAndOffsetBothEyes SetRenderSize(Sizei const &renderSizeLeft, Sizei const &renderSizeRight)
void Set2DAreaFov(float fovRadians)
float LensSurfaceToMidplateInMeters
void SetFov(FovPort const *pfovLeft=NULL, FovPort const *pfovRight=NULL)
EyeConfig GetEyeCenter() const
OVR_FORCE_INLINE const T Min(const T a, const T b)
Matrix4f CreateOrthoSubProjection(bool rightHanded, StereoEye eyeType, float tanHalfFovX, float tanHalfFovY, float unitsX, float unitsY, float distanceFromCamera, float interpupillaryDistance, Matrix4f const &projection, float zNear, float zFar)
void SetZeroVirtualIpdOverride(bool enableOverride)
PredictionValues CurrentPredictionValues
float ChromaticAberration[4]
Size< float > ScreenSizeInMeters
float NoseToPupilInMeters
static Matrix4 Translation(const Vector3< float > &v)
float FirstScanlineToLastScanline
static ViewportScaleAndOffset CalculateViewportScaleAndOffsetInternal(ScaleAndOffset2D const &eyeToSourceNDC, Recti const &renderedViewport, Sizei const &actualRendertargetSurfaceSize)
Matrix4f GetProjectionWithZoom(StereoEye eye, float fovZoom) const
Vector2f PixelsPerTanAngleAtCenter
Vector2f TransformRendertargetNDCToTanFovSpace(const ScaleAndOffset2D &eyeToSourceNDC, const Vector2f &textureNDC)
Matrix4f GetTimewarpDeltaStart(SensorFusion &sfusion, Transformf const &renderedPose)
float ExtraEyeRotationInRadians
FovPort CalculateRecommendedFov(HmdRenderInfo const &hmd, StereoEye eyeType, bool bMakeFovSymmetrical)
ScaleAndOffset2D EyeToSourceNDC
OVR_FORCE_INLINE const T Abs(const T v)
double GetViewRenderPredictionTime()
void UpdateComputedState()
static Recti CalculateViewportInternal(StereoEye eyeType, Sizei const actualRendertargetSurfaceSize, Sizei const requestedRenderedPixelSize, bool bRendertargetSharedByBothEyes, bool bMonoRenderingMode=false)
float CenterFromTopInMeters
void SetLensOverride(LensConfig const *pLensOverrideLeft=NULL, LensConfig const *pLensOverrideRight=NULL)