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
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2015-06-29 16:24:25 +0300
committerDalai Felinto <dfelinto@gmail.com>2015-06-29 16:24:25 +0300
commit3d12d4b94f9bff6ea810179e22a5e3e018541f31 (patch)
treeb7a0e7d2bc49c0d5757c8a8394b60ff99a9a2900 /source/blender/blenkernel/intern/camera.c
parent295d0c52a26730edc6d4ed1276e4051cce006be5 (diff)
Fix T45234: Stereo Parallel vs. Off-Axis
Parallel rendering was not working. The idea of having parallel convergence mode to render as parallel but visualize as off-axis was good, but it was leading to some complications in the code. I think it's more clear to the user if parallel looks and render as parallel, and if she wants to pre-visualize the converged planes, simply temporarily set the camera to off-axis.
Diffstat (limited to 'source/blender/blenkernel/intern/camera.c')
-rw-r--r--source/blender/blenkernel/intern/camera.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c
index 87d81a9e921..b308dc7a262 100644
--- a/source/blender/blenkernel/intern/camera.c
+++ b/source/blender/blenkernel/intern/camera.c
@@ -908,6 +908,9 @@ static float camera_stereo3d_shift_x(Object *camera, const char *viewname)
convergence_mode = data->stereo.convergence_mode;
pivot = data->stereo.pivot;
+ if (convergence_mode != CAM_S3D_OFFAXIS)
+ return shift;
+
if (((pivot == CAM_S3D_PIVOT_LEFT) && is_left) ||
((pivot == CAM_S3D_PIVOT_RIGHT) && !is_left))
{
@@ -918,11 +921,7 @@ static float camera_stereo3d_shift_x(Object *camera, const char *viewname)
fac = 0.5f;
fac_signed = is_left ? fac : -fac;
-
- /* Note: in viewport, parallel renders as offaxis, but in render it does parallel */
- if (ELEM(convergence_mode, CAM_S3D_OFFAXIS, CAM_S3D_PARALLEL)) {
- shift += ((interocular_distance / data->sensor_x) * (data->lens / convergence_distance)) * fac_signed;
- }
+ shift += ((interocular_distance / data->sensor_x) * (data->lens / convergence_distance)) * fac_signed;
return shift;
}