I am unsure of why cx and cy are divided by width - 1.0/height - 1.0, and not just width/height. Specifying cx = 0.5 width and cy = 0.5 height should reproduce the behavior of PerspectiveCamera for those matrix entries, where those entries are 0.0 (which would occur if dividing by width/height, but not width - 1.0/height - 1.0. Is this perhaps a bug? Or maybe this is meant to address some pixel centering issue? When I modify to remove the -1s, I get the behavior I expect, but leaving them in produces renderings that are shifted with respect to what I expect.
In the get_projection_matrix method of IntrinsicsCamera there are the lines:
I am unsure of why cx and cy are divided by width - 1.0/height - 1.0, and not just width/height. Specifying cx = 0.5 width and cy = 0.5 height should reproduce the behavior of PerspectiveCamera for those matrix entries, where those entries are 0.0 (which would occur if dividing by width/height, but not width - 1.0/height - 1.0. Is this perhaps a bug? Or maybe this is meant to address some pixel centering issue? When I modify to remove the -1s, I get the behavior I expect, but leaving them in produces renderings that are shifted with respect to what I expect.