How to convert a MVP matrix of a NDC of 2x2x2 cube with center at 0 (openGL) to a MVP matrix of a NDC of 2x2x1 cube with its center at (0, 0, 0.5) (Metal) ?
This link has good explanation of converting a matrix from OpenGL to Metal.
For Metal with its specific NDC, we could either derive the matrix in a similar fashion or use the easy way: transform OpenGL’s NDC to Metal’s NDC. This is done by doing a post multiplication which first scales the 2x2x2 cube to 2x2x1 and then shifts it by 0.5 to have the correct center: