Last active
May 9, 2025 04:43
-
-
Save ibreathebsb/f768ae4ec301190b1bd7e46a1c81b0a0 to your computer and use it in GitHub Desktop.
opengl cube map orientation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// new basis X Y Z to place the camera so that it's a left handed Y-UP Z-Forward system | |
const Eigen::Vector3f cubemapFaceDirections[6][3] = { | |
{{0, 0, 1}, {0, -1, 0}, {-1, 0, 0}}, // negx | |
{{0, 0, 1}, {0, -1, 0}, {1, 0, 0}}, // posx | |
{{1, 0, 0}, {0, 0, -1}, {0, -1, 0}}, // negy | |
{{1, 0, 0}, {0, 0, 1}, {0, 1, 0}}, // posy | |
{{-1, 0, 0}, {0, -1, 0}, {0, 0, -1}}, // negz | |
{{1, 0, 0}, {0, -1, 0}, {0, 0, 1}}, // posz | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment