浏览代码

Fix PBRT exporter FoV aspect ratio calculation

Samuel Kogler 2 年之前
父节点
当前提交
f32c21e6b3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      code/Pbrt/PbrtExporter.cpp

+ 1 - 1
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;