Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-09-08 11:07:08 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-09-08 11:07:08 +0300
commitcb7c61ad54586d83b358af49198cca8cdb00834d (patch)
treed3fa1b000b0dfb6a86ad501122de2a774491be6e /intern
parent310764603a5984e66a526b33ad3367906c059466 (diff)
Fix T46006: Issue with Equirectangular image rendering in Standalone Cycles
Issue was caused by wrong viewplane used for standalone camera.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/render/camera.cpp27
1 files changed, 17 insertions, 10 deletions
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;
+ }
}
}