diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-23 01:13:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-23 01:13:30 +0400 |
commit | 38652023f0f9be0f46d8d83887d18920a31accd7 (patch) | |
tree | eac278c6055e8f62a5a928a6bb2a7b67205d9750 /source/blender/editors/space_view3d/view3d_project.c | |
parent | 84ba424213c286ae9dfdd62bcef25f567c90be3e (diff) |
fix [#34706] Projection precision is zoom dependent
ED_view3d_project_float functions were rounding the results.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_project.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_project.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_project.c b/source/blender/editors/space_view3d/view3d_project.c index 357083f72a8..4be4328d6c3 100644 --- a/source/blender/editors/space_view3d/view3d_project.c +++ b/source/blender/editors/space_view3d/view3d_project.c @@ -144,8 +144,8 @@ static eV3DProjStatus ed_view3d_project__internal(const ARegion *ar, if (((flag & V3D_PROJ_TEST_CLIP_WIN) == 0) || (fx > 0.0f && fx < (float)ar->winx)) { const float fy = ((float)ar->winy / 2.0f) * (1.0f + (vec4[1] * scalar)); if (((flag & V3D_PROJ_TEST_CLIP_WIN) == 0) || (fy > 0.0f && fy < (float)ar->winy)) { - r_co[0] = floorf(fx); - r_co[1] = floorf(fy); + r_co[0] = fx; + r_co[1] = fy; /* check if the point is behind the view, we need to flip in this case */ if (UNLIKELY((flag & V3D_PROJ_TEST_CLIP_NEAR) == 0) && (vec4[3] < 0.0f)) { |