[Bf-blender-cvs] [cb7c61a] master: Fix T46006: Issue with Equirectangular image rendering in Standalone Cycles

Sergey Sharybin noreply at git.blender.org
Tue Sep 8 10:07:48 CEST 2015


Commit: cb7c61ad54586d83b358af49198cca8cdb00834d
Author: Sergey Sharybin
Date:   Tue Sep 8 13:07:08 2015 +0500
Branches: master
https://developer.blender.org/rBcb7c61ad54586d83b358af49198cca8cdb00834d

Fix T46006: Issue with Equirectangular image rendering in Standalone Cycles

Issue was caused by wrong viewplane used for standalone camera.

===================================================================

M	intern/cycles/render/camera.cpp

===================================================================

diff --git a/intern/cycles/render/camera.cpp b/intern/cycles/render/camera.cpp
index c10a750..71d6f43 100644
--- a/intern/cycles/render/camera.cpp
+++ b/intern/cycles/render/camera.cpp
@@ -92,19 +92,26 @@ Camera::~Camera()
 
 void Camera::compute_auto_viewplane()
 {
-	float aspect = (float)width/(float)height;
-
-	if(width >= height) {
-		viewplane.left = -aspect;
-		viewplane.right = aspect;
-		viewplane.bottom = -1.0f;
+	if(type == CAMERA_PANORAMA) {
+		viewplane.left = 0.0f;
+		viewplane.right = 1.0f;
+		viewplane.bottom = 0.0f;
 		viewplane.top = 1.0f;
 	}
 	else {
-		viewplane.left = -1.0f;
-		viewplane.right = 1.0f;
-		viewplane.bottom = -1.0f/aspect;
-		viewplane.top = 1.0f/aspect;
+		float aspect = (float)width/(float)height;
+		if(width >= height) {
+			viewplane.left = -aspect;
+			viewplane.right = aspect;
+			viewplane.bottom = -1.0f;
+			viewplane.top = 1.0f;
+		}
+		else {
+			viewplane.left = -1.0f;
+			viewplane.right = 1.0f;
+			viewplane.bottom = -1.0f/aspect;
+			viewplane.top = 1.0f/aspect;
+		}
 	}
 }




More information about the Bf-blender-cvs mailing list