Closed russell-taylor closed 7 years ago
This will fix a disconnect between the center of projection for determining the projection matrix and the one used for distortion correction in the case where the D factors are other than 1 in radially-symmetric distortion correction.
The original COP fields in the display configuration describe where the eye is w.r.t. the center of the screen and were in normalized screen coordinates. The radially-symmetric distortion correction code re-used these to also specify the center of distortion, but it did so (incorrectly) in D-scaled space. This patch corrects that incorrect overuse by leaving the COP in normalized screen coordinates. The way it is now, changing them to D space breaks the projection matrix, which expects them to be in normalized space. The documentation is being modified to be consistent with the correct behavior.
Is more of an explanation needed?
This makes sense following our discussion yesterday. We'll probably need a separate center of distortion as well, as we discussed, possibly for each viewport, and presumably in normalized screen coordinates as well.
…ce units in scaled distortion space to unit coordinates in screen space.
This makes the COP for purposes of projection consistent with the distortion and does the required math inside the library rather than in the config-file generation code.