So, Camera.CalculateObliqueMatrix is a helper function to calculate an oblique projection matrix for the current camera.
However, in the case of Stereo rendering there are two projection matrices and an oblique near clipping plane should result in two different projection matrices for the two eyes (unless it is parallel to the line between the two eyes).
It seems Camera.CalculateObliqueMatrix does not yet support stereoscopic cameras?
Does someone know how to work around that or knows the formula to properly compute the oblique projection matrices for the two eyes manually?
I know it is almost a year but maybe someone stubles upon this thread.
I found this code online:
static Matrix4x4 CalculateObliqueMatrix(Matrix4x4 projection, Vector4 clipPlane)
{
Matrix4x4 obliqueMatrix = projection;
Vector4 q = projection.inverse * new Vector4(
Math.Sign(clipPlane.x),
Math.Sign(clipPlane.y),
1.0f,
1.0f
);
Vector4 c = clipPlane * (2.0F / (Vector4.Dot (clipPlane, q)));
obliqueMatrix[2] = c.x - projection[3];
obliqueMatrix[6] = c.y - projection[7];
obliqueMatrix[10] = c.z - projection[11];
obliqueMatrix[14] = c.w - projection[15];
return obliqueMatrix;
}
Source
Which, when passing the StereoProjectionMatrix of your camera of an eye, yielded in the results I wanted.