diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-22 17:13:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-22 17:16:06 +0300 |
commit | 4f9451c044218b9b8a09b7355cea883b7320f9f0 (patch) | |
tree | 203344399e5caa025c1efa750ad03582a39f7f39 /source/blender/draw/modes | |
parent | 33d322873e656982ac604347e91745c9cc6d667b (diff) |
Camera: change how the minimum near clip depth is set
do_clip wasn't working for its intended purpose,
replace with a simpler method.
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 82a660dfd5f..1af6a5fff5d 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -1850,24 +1850,9 @@ static void DRW_shgroup_camera(OBJECT_ShadingGroupList *sgl, Object *ob, ViewLay scale[2] = 1.0f / len_v3(ob->obmat[2]); } - BKE_camera_view_frame_ex(scene, cam, cam->drawsize, false, scale, + BKE_camera_view_frame_ex(scene, cam, cam->drawsize, look_through, scale, asp, shift, &drawsize, vec); - if (look_through) { - /* Ensure the frame isn't behind the near clipping plane, T62814. */ - float fac = (cam->clip_start + 0.1f) / -vec[0][2]; - if (fac > 1.0f) { - for (uint i = 0; i < 4; i++) { - if (rv3d->is_persp) { - mul_v3_fl(vec[i], fac); - } - else { - vec[i][2] *= fac; - } - } - } - } - /* Frame coords */ copy_v2_v2(cam->runtime.drw_corners[0][0], vec[0]); copy_v2_v2(cam->runtime.drw_corners[0][1], vec[1]); |