Closed emmahafermann closed 7 years ago
This is also described in https://github.com/sensics/OSVR-RenderManager/blob/master/osvr/RenderKit/DistortionParameters.h#L98, which includes:
/// @todo Turn COP always into the range 0-1, and have it always use the
/// lower-left corner of the display, even for Direct3D. Do the
/// conversions internally. When this is done, also adjust the flipping
/// in the OpenGL to D3D to suit.
This scaling is done in fc38e9fd2bac7634f03eafe8cbd23c6015c51341 by defining the COP in the config file to always be normalized w.r.t. the screen and now doing the D scaling inside the distortion-correction code.
The discrepancy between the actual FOV and the specified FOV for COPs not at the center of the screen is addressed in documentation in https://github.com/OSVR/OSVR-Docs/blob/russell-taylor-patch-3/Configuring/distortion.md by defining the specification of the FOV as being w.r.t a centered COP.
The function below needs to normalize xCOP/yCOP by the distance scale specified in the config file. Also, if the xCOP/yCOP is not at the center of the screen, then calculating right/left/top/bottom by taking tan(fov/2) then scaling by the COP offset will introduce error.
https://github.com/sensics/OSVR-RenderManager/blob/master/osvr/RenderKit/RenderManagerBase.cpp#L1098