Use max resolution when not moving or training (#1091)

use max resolution when not moving or training
This commit is contained in:
machenmusik authored and GitHub committed 2022-12-05 16:03:09 -08:00
1 parent 2a62d8a14e
commit f3442c8b7b
1 file changed
+6 -3
+6 -3
View File
@@ -672,9 +672,12 @@ class ViewerState:
aspect_ratio = camera_object["aspect"]
image_height = (num_vis_rays / aspect_ratio) ** 0.5
image_height = int(round(image_height, -1))
image_height = min(self.max_resolution, image_height)
if not self.camera_moving and not is_training:
image_height = self.max_resolution
else:
image_height = (num_vis_rays / aspect_ratio) ** 0.5
image_height = int(round(image_height, -1))
image_height = min(self.max_resolution, image_height)
image_width = int(image_height * aspect_ratio)
if image_width > self.max_resolution:
image_width = self.max_resolution