public Matrix4x4 GetProjection(GvrViewer.Eye eye,
GvrViewer.Distortion distortion = GvrViewer.Distortion.Distorted) {
switch(eye) {
case GvrViewer.Eye.Left:
return distortion == GvrViewer.Distortion.Distorted ?
leftEyeDistortedProjection : leftEyeUndistortedProjection;
case GvrViewer.Eye.Right:
return distortion == GvrViewer.Distortion.Distorted ?
rightEyeDistortedProjection : rightEyeUndistortedProjection;
default:
return Matrix4x4.identity;
}
}
protected Matrix4x4 leftEyeDistortedProjection;