diff --git a/src/Camera.cpp b/src/Camera.cpp index fb9943e..d1f6431 100644 --- a/src/Camera.cpp +++ b/src/Camera.cpp @@ -129,7 +129,8 @@ void Camera::setPerspective(float fovy, float aspect) // Устанавливает заданную ортографическую матрицу void Camera::setOrtho(float width, float height) { - projection = glm::ortho(0.0f, width, 0.0f, height, CAMERA_NEAR, CAMERA_FAR); + const float aspect = width / height; + projection = glm::ortho(-1.0f, 1.0f, -1.0f/aspect, 1.0f/aspect, CAMERA_NEAR, CAMERA_FAR); requiredRecalcVP = true; }