diff --git a/modules/camera/src/vkcv/camera/Camera.cpp b/modules/camera/src/vkcv/camera/Camera.cpp index ffe77898540d1f01a01cb50a39ac06b5cdf95d56..b1d7381e3d548c9edf5d41e8d084c7edb1d02647 100644 --- a/modules/camera/src/vkcv/camera/Camera.cpp +++ b/modules/camera/src/vkcv/camera/Camera.cpp @@ -85,7 +85,7 @@ namespace vkcv { void Camera::updateRatio( int width, int height){ m_width = width; m_height = height; - m_ratio = static_cast<float>(width)/height; + m_ratio = static_cast<float>(width)/glm::max(height, 1); setPerspective( m_fov, m_ratio, m_near, m_far); }