fix aspect

This commit is contained in:
Nick Fisher committed 2023-08-08 13:05:08 +08:00
1 parent 4ec9dbe756
commit 3e982e2993
4 files changed
+81 -54

No files matched your search

+2 -2
View File
@@ -830,10 +830,10 @@ void FilamentViewer::updateViewportAndCameraProjection(
const double aspect = (double)width / height;
Camera& cam =_view->getCamera();
cam.setLensProjection(_cameraFocalLength, aspect, kNearPlane,
cam.setLensProjection(_cameraFocalLength, 1.0f, kNearPlane,
kFarPlane);
// cam.setScaling({1.0 / aspect, 1.0});
cam.setScaling({1.0 / aspect, 1.0});
Log("Set viewport to width: %d height: %d aspect %f scaleFactor : %f", width, height, aspect,
contentScaleFactor);