I am using OpenSceneGraph, which internally uses OpenGL. I transform a vector from view space to projection space with this code:
Vec4 vecVS(0, 0, -10, 1);
Vec4 vecProj = vecVS * projMat;
The view space vector has coordinates of (0, 0, -10, 1), so I expected the point to have x,y coordinates of 0,0, since the point is exactly in the middle
of the near plane. But when I print vecProj, I surprisingly get these values:
(0.000, -4.512, 8.018, 10.000)
[/quote]
x seems to be correct, but how can y be -4.512? Shouldn't y be 0 too? Has anyone an idea what could be wrong?