From f32c21e6b3ff7ba92347fb3c0b9d83d21dd85b22 Mon Sep 17 00:00:00 2001 From: Samuel Kogler Date: Wed, 3 May 2023 16:46:54 +0200 Subject: [PATCH] Fix PBRT exporter FoV aspect ratio calculation --- code/Pbrt/PbrtExporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/Pbrt/PbrtExporter.cpp b/code/Pbrt/PbrtExporter.cpp index a9f8656a4..1378038e4 100644 --- a/code/Pbrt/PbrtExporter.cpp +++ b/code/Pbrt/PbrtExporter.cpp @@ -309,7 +309,7 @@ void PbrtExporter::WriteCamera(int i) { // Get camera fov float hfov = AI_RAD_TO_DEG(camera->mHorizontalFOV); - float fov = (aspect >= 1.0) ? hfov : (hfov * aspect); + float fov = (aspect >= 1.0) ? hfov : (hfov / aspect); if (fov < 5) { std::cerr << fov << ": suspiciously low field of view specified by camera. Setting to 45 degrees.\n"; fov = 45;