From b01290688728d7301dde9df9dce4a335de2420d4 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 21 Feb 2026 22:05:11 -0800 Subject: [PATCH] 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. --- .gitignore | 1 + src/rendering/camera.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 8e047dfe..1ece92da 100644 --- a/.gitignore +++ b/.gitignore @@ -89,3 +89,4 @@ ingest/ # Local texture dumps / extracted art should never be committed assets/textures/ +node_modules/ diff --git a/src/rendering/camera.cpp b/src/rendering/camera.cpp index 825730c0..f2edc7a7 100644 --- a/src/rendering/camera.cpp +++ b/src/rendering/camera.cpp @@ -18,6 +18,8 @@ void Camera::updateViewMatrix() { void Camera::updateProjectionMatrix() { 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 {