diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2021-05-08 14:36:44 -0500 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2021-10-08 18:17:20 -0500 |
| commit | 514475646df7c4c7aa3f8f394bced2a28a22b788 (patch) | |
| tree | 0b3a39ed7c3569e2ea5ef877c10189c1c278be04 /Source/Core/VideoCommon/VertexShaderManager.cpp | |
| parent | aa07fde8a02c7dc3a5ce46f3aa4d4e1d30c87c4e (diff) | |
VideoCommon: update Free Look camera's 'FieldOfView' function to 'FieldOfViewMultiplier' to better reflect usage
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderManager.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexShaderManager.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp index 15e7b8c853..1b0bf55de7 100644 --- a/Source/Core/VideoCommon/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/VertexShaderManager.cpp @@ -366,16 +366,21 @@ void VertexShaderManager::SetConstants() { case ProjectionType::Perspective: { - const Common::Vec2 fov = - g_freelook_camera.IsActive() ? g_freelook_camera.GetFieldOfView() : Common::Vec2{1, 1}; - g_fProjectionMatrix[0] = rawProjection[0] * g_ActiveConfig.fAspectRatioHackW * fov.x; + const Common::Vec2 fov_multiplier = g_freelook_camera.IsActive() ? + g_freelook_camera.GetFieldOfViewMultiplier() : + Common::Vec2{1, 1}; + g_fProjectionMatrix[0] = + rawProjection[0] * g_ActiveConfig.fAspectRatioHackW * fov_multiplier.x; g_fProjectionMatrix[1] = 0.0f; - g_fProjectionMatrix[2] = rawProjection[1] * g_ActiveConfig.fAspectRatioHackW * fov.x; + g_fProjectionMatrix[2] = + rawProjection[1] * g_ActiveConfig.fAspectRatioHackW * fov_multiplier.x; g_fProjectionMatrix[3] = 0.0f; g_fProjectionMatrix[4] = 0.0f; - g_fProjectionMatrix[5] = rawProjection[2] * g_ActiveConfig.fAspectRatioHackH * fov.y; - g_fProjectionMatrix[6] = rawProjection[3] * g_ActiveConfig.fAspectRatioHackH * fov.y; + g_fProjectionMatrix[5] = + rawProjection[2] * g_ActiveConfig.fAspectRatioHackH * fov_multiplier.y; + g_fProjectionMatrix[6] = + rawProjection[3] * g_ActiveConfig.fAspectRatioHackH * fov_multiplier.y; g_fProjectionMatrix[7] = 0.0f; g_fProjectionMatrix[8] = 0.0f; |
