Graphics/Camera: Fix Orthographic projection matrix

This commit is contained in:
Jérôme Leclercq 2021-09-08 19:08:21 +02:00
parent 75f927b414
commit c6763bc623
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ namespace Nz
{
case ProjectionType::Orthographic:
if (m_size.x < 0.f || m_size.y < 0.f)
m_viewerInstance.UpdateProjectionMatrix(Matrix4f::Ortho(0.f, float(m_viewport.x), 0.f, float(m_viewport.y), m_zNear, m_zFar));
m_viewerInstance.UpdateProjectionMatrix(Matrix4f::Ortho(float(m_viewport.x), float(m_viewport.x + m_viewport.width), float(m_viewport.y), float(m_viewport.y + m_viewport.height), m_zNear, m_zFar));
else
m_viewerInstance.UpdateProjectionMatrix(Matrix4f::Ortho(0.f, m_size.x, 0.f, m_size.y, m_zNear, m_zFar));
break;