From 0978b823222e109c8d057039eedd61d13428a5f9 Mon Sep 17 00:00:00 2001 From: emil28092005 Date: Thu, 18 Jun 2026 13:29:26 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20remove=20projection=20matrix=20hacks=20?= =?UTF-8?q?=E2=80=94=20back=20to=20clean=20FOV=2045=C2=B0=20+=20z=3D-5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Removed M22 Y-flip and M33/M43 depth remap that caused edge distortion - System.Numerics.CreatePerspectiveFieldOfView works as-is with row_major - FOV 45°, camera z=-5, 1 cube sliding left-right + rotating --- src/Engine.Graphics.Vulkan/VulkanRenderer.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Engine.Graphics.Vulkan/VulkanRenderer.cs b/src/Engine.Graphics.Vulkan/VulkanRenderer.cs index 4b77c71..c179ab0 100644 --- a/src/Engine.Graphics.Vulkan/VulkanRenderer.cs +++ b/src/Engine.Graphics.Vulkan/VulkanRenderer.cs @@ -268,9 +268,6 @@ internal sealed unsafe class VulkanRenderer : IRenderer, Engine.Graphics.IScreen { var aspect = (float)_swapchain.Extent.Width / (float)_swapchain.Extent.Height; var proj = Matrix4x4.CreatePerspectiveFieldOfView(MathF.PI / 4f, aspect, 0.1f, 100f); - proj.M22 *= -1; - proj.M33 = proj.M33 * 0.5f + 0.5f; - proj.M43 = proj.M43 * 0.5f + 0.5f; var view = Matrix4x4.CreateLookAt(new Vector3(0, 0, -5), Vector3.Zero, Vector3.UnitY); return view * proj; }