Is there any reason besides pure perversity that metal uses a left hand coordinate system?
Left Hand Coordinates???
I'm discovering…
If I understand well, that comes from some openGL origin of Metal.
https://stackoverflow.com/questions/4124041/is-opengl-coordinate-system-left-handed-or-right-handed
So "perversity" is OpenGL, but the link explains the rationale behind .
Included in the sample code project MigratingOpenGLCodeToMetal is the file AAPLMathUtilities. This file contains two functions for creating projection matrixes:
/// Constructs a symmetric perspective Projection Matrix
/// from left-handed Eye Coordinates to left-handed Clip Coordinates,
/// with a vertical viewing angle of fovyRadians, the specified aspect ratio,
/// and the provided absolute near and far Z distances from the eye.
matrix_float4x4 AAPL_SIMD_OVERLOAD matrix_perspective_left_hand(float fovyRadians, float aspect, float nearZ, float farZ);
/// Constructs a symmetric perspective Projection Matrix
/// from right-handed Eye Coordinates to left-handed Clip Coordinates,
/// with a vertical viewing angle of fovyRadians, the specified aspect ratio,
/// and the provided absolute near and far Z distances from the eye.
matrix_float4x4 AAPL_SIMD_OVERLOAD matrix_perspective_right_hand(float fovyRadians, float aspect, float nearZ, float farZ);
So, I guess one can define the geometry of one's objects using either a right hand or a left hand coordinate system and have it display properly depending on which of these two one uses to construct the projection matrix.
This is good. I think I understand things much better now.