Fixing perspective matrices

This commit is contained in:
2025-09-07 20:13:26 +02:00
parent e97beda2bc
commit 7d4cd26c31
3 changed files with 3 additions and 5 deletions
+2 -2
View File
@@ -24,8 +24,8 @@ static Gfx::OGraphics graphics;
int main() { int main() {
std::string gameName = "MeshShadingDemo"; std::string gameName = "MeshShadingDemo";
std::filesystem::path outputPath = fmt::format("/Users/dynamitos/{0}Game/", gameName); std::filesystem::path outputPath = fmt::format("/home/dynamitos/{0}Game/", gameName);
std::filesystem::path sourcePath = fmt::format("/Users/dynamitos/{0}/", gameName); std::filesystem::path sourcePath = fmt::format("/home/dynamitos/{0}/", gameName);
#ifdef WIN32 #ifdef WIN32
std::string libraryEnding = "dll"; std::string libraryEnding = "dll";
#elif __APPLE__ #elif __APPLE__
+1 -1
View File
@@ -26,7 +26,7 @@ static Matrix4 perspectiveProjection(float fov, float aspect, float nearPlane, f
{ {
0.0f, 0.0f,
0.0f, 0.0f,
nearPlane / (nearPlane - farPlane), (nearPlane + farPlane) / (nearPlane - farPlane),
-1.0f, -1.0f,
}, },
{ {
-2
View File
@@ -1,6 +1,4 @@
#pragma once #pragma once
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#define GLM_FORCE_LEFT_HANDED
#ifdef WIN32 #ifdef WIN32
#pragma warning(push) #pragma warning(push)
#pragma warning(disable : 4201) #pragma warning(disable : 4201)