Fix T44133 SSAO in OpenGL rendering from orthographic camera did not
authorAntony Riakiotakis <kalast@gmail.com>
Wed, 25 Mar 2015 14:05:36 +0000 (15:05 +0100)
committerAntony Riakiotakis <kalast@gmail.com>
Wed, 25 Mar 2015 14:05:36 +0000 (15:05 +0100)
work

Safe to include in final release

source/blender/editors/render/render_opengl.c

index 402e72db217dbfc2ed8b052fd706a3c1c8ebfc61..d8da0e9bcda8a5d2688f1000b9106c37daa1ab20 100644 (file)
@@ -223,7 +223,12 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
                        /*int is_ortho = scene->r.mode & R_ORTHO;*/
                        camera = v3d->camera;
                        RE_GetCameraWindow(oglrender->re, camera, scene->r.cfra, winmat);
-                       is_persp = true;
+                       if (camera->type == OB_CAMERA) {
+                               Camera *cam = camera->data;
+                               is_persp = cam->type == CAM_PERSP;
+                       }
+                       else
+                               is_persp = true;
                        BKE_camera_to_gpu_dof(camera, &fx_settings);
                }
                else {