fix: remove projection matrix hacks — back to clean FOV 45° + z=-5

- 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
This commit is contained in:
emil28092005
2026-06-18 13:29:26 +03:00
parent 00f23187d5
commit 0978b82322
@@ -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;
}