diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-05-19 17:29:13 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-05-19 22:01:21 +0300 |
commit | a4cbacacbf8e32038e77e567a29716ede5b5db0a (patch) | |
tree | 428d1aac24d4a44f1d2b12c76247bbe292bcc242 | |
parent | 059f79bdd745dd2fc1b55738623330f32b2c68eb (diff) |
Fix T73847 Overlay: Camera orthographic scale moves background image
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_image.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_image.c b/source/blender/draw/engines/overlay/overlay_image.c index c592f11a855..be3510967b6 100644 --- a/source/blender/draw/engines/overlay/overlay_image.c +++ b/source/blender/draw/engines/overlay/overlay_image.c @@ -287,6 +287,9 @@ static void image_camera_background_matrix_get(const Camera *cam, translate[3][0] = bgpic->offset[0]; translate[3][1] = bgpic->offset[1]; translate[3][2] = cam_corners[0][2]; + if (cam->type == CAM_ORTHO) { + mul_v2_fl(translate[3], cam->ortho_scale); + } /* These lines are for keeping 2.80 behavior and could be removed to keep 2.79 behavior. */ translate[3][0] *= min_ff(1.0f, cam_aspect); translate[3][1] /= max_ff(1.0f, cam_aspect) * (image_aspect / cam_aspect); |