mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Add Vulkan Y-flip to projection matrix and ignore node_modules
Negate projection[1][1] to correct for Vulkan's Y-down NDC convention. Also add node_modules/ to .gitignore to prevent accidental commits.
This commit is contained in:
parent
4fc3689dcc
commit
b012906887
2 changed files with 3 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -89,3 +89,4 @@ ingest/
|
||||||
|
|
||||||
# Local texture dumps / extracted art should never be committed
|
# Local texture dumps / extracted art should never be committed
|
||||||
assets/textures/
|
assets/textures/
|
||||||
|
node_modules/
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@ void Camera::updateViewMatrix() {
|
||||||
|
|
||||||
void Camera::updateProjectionMatrix() {
|
void Camera::updateProjectionMatrix() {
|
||||||
projectionMatrix = glm::perspective(glm::radians(fov), aspectRatio, nearPlane, farPlane);
|
projectionMatrix = glm::perspective(glm::radians(fov), aspectRatio, nearPlane, farPlane);
|
||||||
|
// Vulkan clip-space has Y pointing down; flip the projection's Y axis.
|
||||||
|
projectionMatrix[1][1] *= -1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec3 Camera::getForward() const {
|
glm::vec3 Camera::getForward() const {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue