From cb7c61ad54586d83b358af49198cca8cdb00834d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 8 Sep 2015 13:07:08 +0500 Subject: Fix T46006: Issue with Equirectangular image rendering in Standalone Cycles Issue was caused by wrong viewplane used for standalone camera. --- intern/cycles/render/camera.cpp | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'intern') diff --git a/intern/cycles/render/camera.cpp b/intern/cycles/render/camera.cpp index c10a7500395..71d6f43d980 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; + } } } -- cgit v1.2.3