From c2157ee24e2b9ed3a5ae897bbe0b66b230ce2223 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Thu, 22 Aug 2019 23:28:26 +0200 Subject: [PATCH] - fix field of view --- Source/Core/Rendering/Renderer3D.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Rendering/Renderer3D.cs b/Source/Core/Rendering/Renderer3D.cs index ee95a5d5..1b63f457 100755 --- a/Source/Core/Rendering/Renderer3D.cs +++ b/Source/Core/Rendering/Renderer3D.cs @@ -239,7 +239,7 @@ namespace CodeImp.DoomBuilder.Rendering float fov = Angle2D.DegToRad(General.Settings.VisualFOV); float reversefov = 1.0f / (float)Math.Tan(fov / 2.0f); float reversefovy = reversefov * aspect; - float fovy = (float)Math.Atan(1.0f / reversefovy) * 2.0f; + float fovy = (float)Math.Atan(1.0f / reversefovy); // Make the projection matrix projection = Matrix.PerspectiveFov(fovy, aspect, PROJ_NEAR_PLANE, General.Settings.ViewDistance);