From 0587ee440d49361ce92f9c83c8df01f7a80334ae Mon Sep 17 00:00:00 2001 From: Orange Date: Wed, 4 Dec 2024 12:27:17 +0300 Subject: [PATCH] fixed view matrix --- include/omath/engines/Source/Formulas.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/omath/engines/Source/Formulas.hpp b/include/omath/engines/Source/Formulas.hpp index 28a37c6..8a9c9e8 100644 --- a/include/omath/engines/Source/Formulas.hpp +++ b/include/omath/engines/Source/Formulas.hpp @@ -37,7 +37,7 @@ namespace omath::source { return Mat4x4{ {right.x, right.y, right.z, 0}, - {up.x, up.y, up.z, 0}, + {-up.x, -up.y, -up.z, 0}, {forward.x, forward.y, forward.z, 0}, {0, 0, 0, 1}, } * @@ -59,7 +59,7 @@ namespace omath::source return { {1.f / (aspectRatio * fovHalfTan), 0, 0, 0}, - {0, -1.f / (fovHalfTan), 0, 0}, + {0, 1.f / (fovHalfTan), 0, 0}, {0, 0, (far + near) / (far - near), -(2.f * far * near) / (far - near)}, {0, 0, 1, 0}, };